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 encoded = encodeURIComponent(address);
let url = `https://waze.com/ul?q=${encoded}&navigate=yes`;
if (lastCoords) {
url += `&ll=${lastCoords.lat},${lastCoords.lng}`;
}
Linking.openURL(url);
const wazeApp = `waze://?q=${encoded}&navigate=yes`;
const wazeWeb = `https://waze.com/ul?q=${encoded}&navigate=yes`;
Linking.canOpenURL(wazeApp).then((supported) => {
Linking.openURL(supported ? wazeApp : wazeWeb);
});
};
// --------------------------------------------------