Skip to content

Commit

Permalink
Merge branch 'feat/home-position-after-goal-detail-saved' of https://…
Browse files Browse the repository at this point in the history
…github.com/depromeet/amazing3-fe into feat/home-position-after-goal-detail-saved
  • Loading branch information
deepbig committed Jan 17, 2024
2 parents c378ece + 1e12ad2 commit 0abbed6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/hooks/reactQuery/goal/useGetGoals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,11 @@ export const usePrefetchGoals = (): void => {
queryFn: () => api.get<GoalResponse>('/life-map'),
});
};

export const usePrefetchGoals = (): void => {
const queryClient = useQueryClient();
queryClient.prefetchQuery({
queryKey: ['goals'],
queryFn: () => api.get<GoalResponse>('/life-map'),
});
};

0 comments on commit 0abbed6

Please sign in to comment.