Skip to content

Commit

Permalink
fix: 에러 캐치 쿼리 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
정수현 authored and 정수현 committed Feb 10, 2024
1 parent 446e63d commit 51c6dcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/queries/useBaseQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export const fetchData = async <T>(url: string) => {
export const useBaseQuery = <T>(queryKey: any, url: string) => {
return useSuspenseQuery({
queryKey,
queryFn: async () => await fetchData<T>(url).then((res) => res.data),
queryFn: async () => await fetchData<T>(url).then((res) => res.data).catch((error) => { console.log(error),
});
};

0 comments on commit 51c6dcc

Please sign in to comment.