This PR addresses the issue where tracks were not maintaining the correct order when categories or sort options were changed on the Landing page.
Solution:
Introduced new states key and value for the sorting dropdown, ensuring that it resets to its default state whenever the category is changed. This allows the dropdown to be refreshed and display "Sort by" as the default.
Ensured that after the tracks are filtered based on the selected category, they are always sorted by "newest first" by default. This provides a consistent experience when changing categories, as users expect to see the latest tracks first.
Fixed the issue where the sorting dropdown would become unresponsive to re-selection of the same option. Now, users can re-select the same sorting option after a category change without needing to switch to another option first.
Description:
This PR addresses the issue where tracks were not maintaining the correct order when categories or sort options were changed on the Landing page.
Solution:
key
andvalue
for the sorting dropdown, ensuring that it resets to its default state whenever the category is changed. This allows the dropdown to be refreshed and display "Sort by" as the default.Solution Demo:
https://github.com/user-attachments/assets/571bf82b-c675-44fc-84b9-ce483c043068
Resolves:
Resolves: #676