Skip to content

Commit

Permalink
fix: 공유된 여행 페이지에서 발생하는 문제 수정(쿼리키 불일치)
Browse files Browse the repository at this point in the history
  • Loading branch information
dladncks1217 committed Jan 11, 2024
1 parent 6dac141 commit c637fb6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/hooks/api/useSharedTripQuery.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { TRIP_TYPE } from '@/constants/trip';

import { useSuspenseQuery } from '@tanstack/react-query';

import type { AxiosError } from 'axios';
Expand All @@ -8,7 +10,7 @@ import type { TripData } from '@type/trip';

export const useSharedTripQuery = (tripId: string) => {
const { data: sharedTripData } = useSuspenseQuery<TripData, AxiosError>({
queryKey: ['shared', tripId],
queryKey: [TRIP_TYPE.SHARED, 'trip', tripId],
queryFn: () => getSharedTrip(tripId),
});

Expand Down

0 comments on commit c637fb6

Please sign in to comment.