Waseel: driver app, dispatch, POI suggestions, map fixes

This commit is contained in:
Krikorios
2026-08-25 02:57:49 +03:00
parent 899ca93cd5
commit 1d84003e0a
50 changed files with 3625 additions and 625 deletions
+17 -16
View File
@@ -1,22 +1,23 @@
import { Linking, Text, TouchableOpacity, View } from "react-native";
import { tr } from "@/lib/i18n";
import type { LocationStatus } from "@/lib/use-user-location";
const COPY: Record<string, { title: string; body: string; action: string }> = {
const COPY: Record<string, { titleKey: string; bodyKey: string; actionKey: string }> = {
denied: {
title: "Location access is off",
body: "Waseel needs your location to show nearby drivers and set your pickup point.",
action: "Open Settings",
titleKey: "components.locationNotice.denied.title",
bodyKey: "components.locationNotice.denied.body",
actionKey: "components.locationNotice.denied.action",
},
"services-off": {
title: "Location services are off",
body: "Turn on location on your device, then try again.",
action: "Try Again",
titleKey: "components.locationNotice.servicesOff.title",
bodyKey: "components.locationNotice.servicesOff.body",
actionKey: "components.locationNotice.servicesOff.action",
},
unavailable: {
title: "Couldn't find your location",
body: "Move somewhere with a clearer signal, or set your pickup point manually.",
action: "Try Again",
titleKey: "components.locationNotice.unavailable.title",
bodyKey: "components.locationNotice.unavailable.body",
actionKey: "components.locationNotice.unavailable.action",
},
};
@@ -34,12 +35,12 @@ export const LocationNotice = ({
return (
<View className="flex-1 items-center justify-center px-6">
<Text className="text-base font-JakartaBold text-black text-center">
{copy.title}
<Text className="text-base font-JakartaBold text-black dark:text-white text-center">
{tr(copy.titleKey)}
</Text>
<Text className="text-sm font-Jakarta text-general-200 text-center mt-2">
{copy.body}
<Text className="text-sm font-Jakarta text-general-200 dark:text-neutral-400 text-center mt-2">
{tr(copy.bodyKey)}
</Text>
<TouchableOpacity
@@ -50,9 +51,9 @@ export const LocationNotice = ({
className="mt-5 rounded-full bg-primary-500 px-6 py-3"
>
<Text className="text-white font-JakartaBold text-sm">
{copy.action}
{tr(copy.actionKey)}
</Text>
</TouchableOpacity>
</View>
);
};
};