Fix jwt-token
This commit is contained in:
@@ -209,7 +209,6 @@ const MapView = () => {
|
|||||||
const centerLat = (minLat + maxLat) / 2;
|
const centerLat = (minLat + maxLat) / 2;
|
||||||
const centerLon = (minLon + maxLon) / 2;
|
const centerLon = (minLon + maxLon) / 2;
|
||||||
setMapCenter([centerLat, centerLon]);
|
setMapCenter([centerLat, centerLon]);
|
||||||
setIsInitialLoad(false); // Mark that initial load is complete
|
|
||||||
|
|
||||||
// Disable bounds fitting after a short delay to allow initial fit
|
// Disable bounds fitting after a short delay to allow initial fit
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -217,6 +216,11 @@ const MapView = () => {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Always mark initial load as complete after first fetch, regardless of device data
|
||||||
|
if (isInitialLoad) {
|
||||||
|
setIsInitialLoad(false);
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error fetching devices:', error);
|
console.error('Error fetching devices:', error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user