This commit is contained in:
dahyeon committed 2026-04-26 01:22:38 -07:00
1 parent 905bbcc6dd
commit 2472f865ad
14 files changed
+825 -18

No files matched your search

+17
View File
@@ -5,11 +5,14 @@ import type {
ApiAuction,
ApiCommunity,
ApiMatch,
DdragonManifest,
MatchStatus,
MatchesResponse,
MeResponse,
} from './types';
const DDRAGON_MANIFEST_STALE_MS = 24 * 60 * 60 * 1000;
interface MatchesQueryOptions {
status?: MatchStatus;
limit?: number;
@@ -74,6 +77,20 @@ export function useAuction(
});
}
export function useDdragonManifest(locale = 'ko_KR') {
return useQuery({
queryKey: ['ddragon-manifest', locale],
queryFn: () =>
apiFetch<DdragonManifest>(
`/riot/ddragon/manifest?locale=${encodeURIComponent(locale)}`,
),
staleTime: DDRAGON_MANIFEST_STALE_MS,
gcTime: DDRAGON_MANIFEST_STALE_MS,
refetchOnMount: false,
refetchOnReconnect: false,
});
}
export function useMe() {
const authUserId = useAuthUserId();