staleTime

This commit is contained in:
nvrl committed 2026-06-15 20:01:34 +02:00
1 parent 6a8e7d53f9
commit 1620b24ff3
4 files changed
+30 -12

No files matched your search

+5
View File
@@ -74,6 +74,11 @@ Verify mutations `invalidateQueries`; consider optimistic insert so reviews appe
---
## Implementation status
- [x] Q2 — `useCategories()` query hook (`api/queries/useCategories.ts`, key
`queryKeys.categories()`, 30 min `staleTime`). Replaced raw
`api.get('categories/')` + `useState`/`useEffect` in `App.tsx` with the hook;
dropped the now-unused `api` import. Cached + shared across mounts. `tsc` +
ESLint (0 errors) clean.
- [x] R1 + R2 + Q1 — notif menu dedup + i18n + SPA nav. Extracted shared
`<NotificationMenu>` (`components/layout/NotificationMenu.tsx`) + `useNotificationClick()`
hook (`hooks/useNotificationClick.ts`); `App.tsx` and `NavSidebar.tsx` now both render