JamesReviewsMusic
JRM-49Rework useAlbumStatus fetching behaviour
Description
Beyond the wrong URL (fixed in JRM-2), useAlbumStatus has behaviour problems:
- staleTime: 0 plus refetchOnMount and refetchOnWindowFocus both set to "always" means the bookmark status refetches constantly. A 30-60s staleTime is plenty for a single-admin app
- The bookmark status endpoint is admin-only, but the hook fires for everyone, so anonymous visitors generate guaranteed 401s on pages using it. Skip the query (enabled: false) when not admin
- Errors from both queries should surface to the caller rather than being flattened away
Sub-tickets
0No sub-tickets yet.
Links
No links.
Comments
0No comments yet.