💄 Increase default zoom & prepare click tooltip

This commit is contained in:
2024-10-04 20:08:08 +02:00
parent 68b1e0f331
commit 0810a81f3a
3 changed files with 62 additions and 6 deletions
+6 -2
View File
@@ -24,6 +24,8 @@ export const useData = () => {
zoom: 5,
});
const [clickedItem, setClickedItem] = useState(null);
useEffect(() => {
if ('geolocation' in navigator == false) {
setCanUseGeolocation(false);
@@ -38,7 +40,7 @@ export const useData = () => {
...prev,
latitude: position.coords.latitude,
longitude: position.coords.longitude,
zoom: 13,
zoom: 17,
}));
setUserLocation({
latitude: position.coords.latitude,
@@ -46,9 +48,9 @@ export const useData = () => {
});
},
(error) => {
console.warn(error.message);
if (error.PERMISSION_DENIED) {
setGeoError('permission_denied');
console.warn(error.message);
}
},
{
@@ -119,6 +121,8 @@ export const useData = () => {
geoError,
layers,
canUseGeolocation,
clickedItem,
setClickedItem,
isAddLoveOpened,
setIsAddLoveOpened,
isLoading,