added retry count to global react-query setup
This commit is contained in:
@@ -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>
|
||||
:
|
||||
|
||||
Reference in New Issue
Block a user