mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-07-14 18:15:56 -04:00
Persist dashboard periods and explore genre filters in URL via nuqs
- Add `nuqs` dependency; define `dashboardSearchParams` and `exploreSearchParams` loaders in new `search-params.ts` files - Thread `moviePeriod`/`episodePeriod` from URL into `StatsSection` and `StatsDisplay`, replacing local `useState` with `useQueryStates` - Rename `getUserStats` fields `moviesThisMonth`/`episodesThisWeek` → `movieCount`/`episodeCount` and accept period args so SSR stats match the active URL params - Pre-fetch genre-filtered results server-side on the explore page when `movieGenre`/`tvGenre` params are present; pass as `initialGenreItems` to `FilterableTitleRow` so first paint is already populated - Render genre chips as `<Link>` elements (with click-handler fallback) so genre selections produce shareable, bookmarkable URLs
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
"motion": "12.35.1",
|
||||
"next": "16.1.6",
|
||||
"node-vibrant": "4.0.4",
|
||||
"nuqs": "2.8.9",
|
||||
"openapi-fetch": "0.17.0",
|
||||
"react": "19.2.4",
|
||||
"react-day-picker": "9.14.0",
|
||||
|
||||
Reference in New Issue
Block a user