added retry count to global react-query setup

This commit is contained in:
victorAnumudu
2024-12-12 19:56:11 +01:00
parent 94d8e9f0ef
commit 26bb5d0d11
3 changed files with 7 additions and 5 deletions
+3 -3
View File
@@ -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 (
<>
<div className="card card-statistics h-100 mb-0">
@@ -33,7 +33,7 @@ console.log('data', data)
: isError ?
<div className="row">
<div className="col-12">
<p className='text-danger'>Error occured! Please refresh to continue</p>
<p className='text-danger'>{error.message}</p>
</div>
</div>
: