mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-04-06 01:25:33 +00:00
Update lib/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView/hooks.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
5ed20eebbf
commit
1d1fc51f15
@ -14,12 +14,10 @@ export const useNavigationUrl = (coordinates?: [number, number]) => {
|
|||||||
|
|
||||||
const [longitude, latitude] = coordinates
|
const [longitude, latitude] = coordinates
|
||||||
|
|
||||||
if (isMobile) {
|
|
||||||
return `geo:${latitude},${longitude}`
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isIOS) {
|
if (isIOS) {
|
||||||
return `https://maps.apple.com/?daddr=${latitude},${longitude}`
|
return `https://maps.apple.com/?daddr=${latitude},${longitude}`
|
||||||
|
} else if (isMobile) {
|
||||||
|
return `geo:${latitude},${longitude}`
|
||||||
} else {
|
} else {
|
||||||
return `https://www.google.com/maps/dir/?api=1&destination=${latitude},${longitude}`
|
return `https://www.google.com/maps/dir/?api=1&destination=${latitude},${longitude}`
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user