diff --git a/src/App.js b/src/App.js index b249c52..1a5ece6 100644 --- a/src/App.js +++ b/src/App.js @@ -9,7 +9,8 @@ function App() { defaultOptions: { queries: { // staleTime: Infinity, - refetchOnWindowFocus: false + refetchOnWindowFocus: false, + retry: 3, }, }, }) diff --git a/src/component/home/RecentActions.jsx b/src/component/home/RecentActions.jsx index 713f082..d77970c 100644 --- a/src/component/home/RecentActions.jsx +++ b/src/component/home/RecentActions.jsx @@ -5,11 +5,11 @@ import queryKeys from "../../services/queryKeys"; export default function RecentActions() { - const {data, isFetching, isError} = useQuery({ + const {data, isFetching, isError, error} = useQuery({ queryKey: queryKeys.recentAction, queryFn: async () => await recentActions() }) -console.log('data', data) +console.log('data', error) return ( <>
Error occured! Please refresh to continue
+{error.message}