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