Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jobs page filtering functionality #123

Merged
merged 3 commits into from
Nov 15, 2022

Conversation

marwazpov
Copy link
Collaborator

This PR is related to issue #35 :)

I have also updated the data file to make dealing with data easier!

@vercel
Copy link

vercel bot commented Nov 14, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
capstonejobie ✅ Ready (Inspect) Visit Preview Nov 15, 2022 at 10:24AM (UTC)

@marwazpov marwazpov added this to the Functionality milestone Nov 14, 2022
@marwazpov marwazpov added the enhancement New feature or request label Nov 14, 2022
@marwazpov marwazpov self-assigned this Nov 14, 2022
Copy link
Contributor

@AllanSaleh AllanSaleh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spectacular work as always!!😍
Your code is so beautifully written! It is art!😎
Keep up the ✨AMAZING✨ work!🙌🚀

@@ -8,16 +8,16 @@ function CombiningFilterComponents() {
const [data, setData] = useState(filterData);

return (
<div className="App px-7">
<div className="App bg-gray-200 px-7 bg-gray-200 ">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kudos to you!!
The component looks nicer now!!

Comment on lines +5 to +9
const minSalaryArray = filterData.map((item) => item.minSalary);
const minSalaryValue = Math.min(...minSalaryArray);

const maximumSalaryArray = filterData.map((item) => item.maxSalary);
const maxSalaryValue = Math.max(...maximumSalaryArray);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love how you took advantage of the built-in Math function of min and max!!🔥
This is a very clever way of doing things!👏

Comment on lines +44 to +56
useEffect(() => {
setData(
filterData.filter((item) => {
if (
item.minSalary >= filter.salary.min &&
item.minSalary <= filter.salary.max
) {
return item;
}
return null;
})
);
}, [filter.salary]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work on achieving the filtering!!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @AllanSaleh for your continuous support and guidance! I really appreciate your efforts and dedication! Have a lovely day 🙏

@AllanSaleh AllanSaleh merged commit 472b8c2 into develop Nov 15, 2022
@AllanSaleh AllanSaleh deleted the jobs-page-filtering-functionality branch November 15, 2022 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants