daily-code icon indicating copy to clipboard operation
daily-code copied to clipboard

Feat: Persisting the Category state in the URL as query params

Open nigupta29 opened this issue 1 year ago • 0 comments

Brief:

  1. Currently, the category and filtered state has been dealt at client side.
  2. 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

  1. Added category options to the getAllTracks util functions.
  2. Converted Tracks component from client to server.
  3. Moved Landing component to the main page to directly pass the searchParams to the getAllTracks.

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

nigupta29 avatar Apr 22 '24 20:04 nigupta29