fix(fav-page): switch from static cacheKey to dynamic refreshDeps

- Replace the static `cacheKey` with `refreshDeps: [headers]` in the
  query configuration.
- This ensures the cached data is automatically refreshed when the
  headers dependency changes, rather than relying on a static cache
  identifier.
This commit is contained in:
kyuuseiryuu 2026-03-25 12:02:51 +09:00
parent 191906192b
commit f7b7216ef1

View File

@ -39,7 +39,7 @@ export function FavePlayersPage() {
const res = await fetch(`/api/fav`, { headers });
const data = await res.json();
return data;
}, { manual: true, cacheKey: 'favListRequest', cacheTime: 3 * 60 * 1000 });
}, { manual: true, refreshDeps: [headers], cacheTime: 3 * 60 * 1000 });
const list = useMemo(() => {
const l = showType === ShowType.LOCAL ? localList : favListRequest.data?.map(e => ({