daily-code
daily-code copied to clipboard
Feat: Persisting the Category state in the URL as query params
Brief:
- Currently, the category and filtered state has been dealt at client side.
- This PR covers the handling of category filtering at server side.
Checklist before requesting a review
- [x] I have performed a self-review of my code
- [x] I assure there is no similar/duplicate pull request regarding same issue
Major Changes
- Added category options to the
getAllTracksutil functions. - Converted
Trackscomponent from client to server. - Moved
Landingcomponent to the main page to directly pass thesearchParamsto thegetAllTracks.
Have a review on this PR. Thanks!
How the categories has been persisted currently.
https://github.com/code100x/daily-code/assets/128571356/5d272b98-2fd3-451c-9627-8f9db6b3f68c
How the categories has been persisted in this PR.
https://github.com/code100x/daily-code/assets/128571356/2e5b5ec1-2f0c-43ba-af1d-39bcfb430708