💄 Increase default zoom & prepare click tooltip
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user