Téléchargmeent des mises à jour de solde

This commit is contained in:
2024-12-13 23:07:37 +01:00
parent 4a33963c12
commit 02304527d3
7 changed files with 82 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ import { useGeolocationMutation } from '@/hooks/mutations/useGeolocationMutation
import { useStartGeolocationServiceEffect } from '@/utils/geolocation'
import { Platform } from 'react-native'
import { useQuery } from '@tanstack/react-query'
import { isAuthValid } from '@/utils/features/auth/authSlice'
export default function GeolocationProvider({ children }: { children: ReactNode }) {
useStartGeolocationServiceEffect()
@@ -36,8 +37,9 @@ export default function GeolocationProvider({ children }: { children: ReactNode
headers: {
"Authorization": `Bearer ${auth.token}`,
"Content-Type": "application/json",
}}
).then(resp => resp.json()),
},
}).then(resp => resp.json()),
enabled: isAuthValid(auth),
refetchInterval: 5000,
})
useEffect(() => {