On envoie des localisations quand on est connecté⋅e, pas l'inverse

This commit is contained in:
2024-12-15 18:01:13 +01:00
parent 76643fcc62
commit 39312adc2a
2 changed files with 1 additions and 8 deletions

View File

@ -22,7 +22,7 @@ export default function GeolocationProvider({ children }: { children: ReactNode
if (Platform.OS !== "web") {
useEffect(() => {
if (geolocationsQueue.length === 0 || geolocationMutation.isPending || isAuthValid(auth))
if (geolocationsQueue.length === 0 || geolocationMutation.isPending || !isAuthValid(auth))
return
const locToSend = geolocationsQueue[0]
geolocationMutation.mutate(locToSend)