@tomhine
Posted
Hi Paola, this solution looks really good. Well done!
You'll probably want to add some conditional styles for the green left hand border as they should only be coloured on the featured jobs.
The filtering is definitely tricky, I've put together a simple demo of how I would do it and pushed it to github if you'd like to look at it.
The basic gist is that only the filters that are active need to be tracked in useState as the filtered jobs can be built from those active filters and the original jobs. I would put the active filters in a array in useState as this makes it easy to add and remove them.
The array.filter method returns the new filtered array leaving the original array untouched, so you don't have to keep the original in state as this never has to change.
I hope this helps, definitely try cloning that example repo and mess around with it!
Marked as helpful