chore: fix waze

This commit is contained in:
2026-03-02 23:01:52 +01:00
parent d299601667
commit 2dd3db7214
@@ -460,11 +460,11 @@ export default function DashboardScreen() {
const openNavigation = (address: string) => { const openNavigation = (address: string) => {
const encoded = encodeURIComponent(address); const encoded = encodeURIComponent(address);
let url = `https://waze.com/ul?q=${encoded}&navigate=yes`; const wazeApp = `waze://?q=${encoded}&navigate=yes`;
if (lastCoords) { const wazeWeb = `https://waze.com/ul?q=${encoded}&navigate=yes`;
url += `&ll=${lastCoords.lat},${lastCoords.lng}`; Linking.canOpenURL(wazeApp).then((supported) => {
} Linking.openURL(supported ? wazeApp : wazeWeb);
Linking.openURL(url); });
}; };
// -------------------------------------------------- // --------------------------------------------------