Add conditional rendering for the Clear Filters button in the JobFilters component. The button should only appear when at least one filter is selected, improving the user interface and reducing clutter.
🎤 Why is this feature needed ?
Currently, the Clear Filters button is always visible, even when no filters are selected. This can lead to a cluttered interface and potential user confusion. By only showing the button when filters are active, we can improve the user experience by:
Reducing visual noise when no filters are applied
Providing a clear indication that filters are in use
Offering an easy way to reset filters only when necessary
This change will make the job search interface cleaner and more intuitive for users.
✌️ How do you aim to achieve this?
Create a new custom hook called useFilterCheck to determine if any filters are selected
Update the JobFilters component to use this new hook
Modify the rendering of the Clear Filters button to be conditional based on the hook's output
The implementation will involve:
Creating a new TypeScript file for the useFilterCheck hook
Updating the JobFilters component to import and use the new hook
Using conditional rendering to show/hide the Clear Filters button
🔄️ Additional Information
An alternative approach could be to disable the Clear Filters button when no filters are selected, rather than hiding it completely. However, hiding the button when it's not needed provides a cleaner interface and is more aligned with modern UI practices.
👀 Have you spent some time to check if this feature request has been raised before?
🔖 Feature description
Add conditional rendering for the Clear Filters button in the JobFilters component. The button should only appear when at least one filter is selected, improving the user interface and reducing clutter.
🎤 Why is this feature needed ?
Currently, the Clear Filters button is always visible, even when no filters are selected. This can lead to a cluttered interface and potential user confusion. By only showing the button when filters are active, we can improve the user experience by:
This change will make the job search interface cleaner and more intuitive for users.
✌️ How do you aim to achieve this?
useFilterCheck
to determine if any filters are selectedThe implementation will involve:
useFilterCheck
hook🔄️ Additional Information
An alternative approach could be to disable the Clear Filters button when no filters are selected, rather than hiding it completely. However, hiding the button when it's not needed provides a cleaner interface and is more aligned with modern UI practices.
👀 Have you spent some time to check if this feature request has been raised before?
🏢 Have you read the Code of Conduct?
Are you willing to submit PR?
Yes I am willing to submit a PR!