@Mahesh-yadav
Posted
Hi
Overall its great work. I get to know about Array.every()
function by looking at your code.
There is a small bug in your filtering jobs functionality. There are total 10 posts in the data set with job.role
values as follows.
**6 - Frontend, 2 - Fullstack, 1 - FullStack and 1 - Backend **. Pay attention to letter case - Fullstack vs FullStack. So when I select Fullstack
, your app correctly shows 2 jobs and when I select FullStack
, it correctly shows 1 job.
Currently, your search is case sensitive. But, search functionality is generally case-insensitive. In your code, convert filter item and technologies to either lowercase or uppercase before comparing in the following part of your code.
let technologies = [i.role, i.level, ...i.languages, ...i.tools];
if (filter.every((item) => technologies.includes(item))) {
return <JobBox info={i} addTags={addTags} key={i.id} />;
}
return null;
@magdakok
Posted
Hello! So kind of you to even have a look at the code, thank you! I've just solved the problem :) I like how simple and clean the every() function is :)
Thank you for the help :)