Skip to content

Commit

Permalink
fix: 쿼리키 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
joarthvr committed Dec 1, 2024
1 parent 2267a57 commit 6cd8422
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/features/gathering/api/gathering.hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const useGatheringList = (
position?: GatheringPosition,
) => {
return useCustomInfiniteQuery<TransformedGatheringResponse, GatheringItemDto, Error>(
['gatherings', sort ?? '', period ?? '', position ?? '', status],
['/gathering/list', sort ?? '', period ?? '', position ?? '', status],
async ({ pageParam }) => {
const response = await getGatheringList.getGatherings({
sort,
Expand All @@ -47,7 +47,7 @@ export const useGatheringList = (

export const useGatheringDetail = (gatheringId: string) => {
const { data, isLoading, isError, error } = useQuery<GatheringDetailResponse, Error>({
queryKey: ['gathering', 'detail', gatheringId],
queryKey: ['/gathering', 'detail', gatheringId],
queryFn: () => gatheringDetailApi.getGatheringById(gatheringId),
enabled: !!gatheringId,
staleTime: 1000 * 60 * 5, // 5분 동안 캐시 유지
Expand Down

0 comments on commit 6cd8422

Please sign in to comment.