Job listining with filtering

Please log in to post a comment
Log in with GitHubCommunity feedback
- P@ttsoares
A beautiful page ! Very close to the design...
Some comments:
-
If the user click, say at "HTML" then only two results do remain. Now, if also "CSS" is selected only one should remain.
-
At windows size of 768px some cards seem to lose the proper placement... Look the "Account" card: The "2d ago" is in two lines.
-
Your hook UseJobList should be useJobList because React's Rules of Hooks (enforced by both React itself and tools like the ESLint eslint-plugin-react-hooks) require that any custom hook starts with lowercase use.
-
About the filter hook:
Your filtering is being done on the current jobs state:
const filteredJobs: Job[] = jobs.filter( /* ... */ );
But jobs already holds the filtered result from the last filter run. This will cause cumulative filtering over already-filtered jobs, which is a bug.
- Maybe this could help:
useEffect(() => { if (filters.length > 0) { const filteredJobs: Job[] = jobsData.filter( (job) => filters.includes(job.role) || filters.includes(job.level) || filters.some((filter) => job.tools.includes(filter)) || filters.some((filter) => job.languages.includes(filter)) ); setJobs(filteredJobs); } else { setJobs(jobsData); } }, [filters, jobsData]);
- Como achei este comentário:
//Tipos e interfaces
Pergunto: Falas Português ?
Marked as helpful -
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord