Fix [FEATURE] Hide repositories with zero issues with gitauto model #235
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Original issue: #88
What is the feature
This feature adds an option to hide repositories with zero issues (vacancies) on the Repositories page.
Why we need the feature
Currently, users have to manually sift through repositories with no issues, which can be time-consuming and inefficient. By adding a switch to hide repositories with zero issues, we can improve the user experience by allowing users to focus only on repositories with active issues.
How to implement and why
Add a Switch Component:
react-switch
component to create a toggle switch.Default State:
Store State in localStorage:
localStorage
to maintain the user's preference across sessions.Query String Parameter:
hide-empty
query string parameter based on the switch's state.hide-empty=true
to hide repositories with zero issues.Update UI:
Code Changes:
src/Pages/Repositorios.js
to include the switch and handle its state.src/Hooks/useFetch.js
to include thehide-empty
parameter based on the switch state.By following these steps, we can ensure a seamless and efficient user experience for filtering repositories based on the number of issues.
Test these changes locally