- Replace Clerk with self-hosted JWT auth (register/login/verify, bcrypt passwords, Gmail OTP with console fallback) - Add lib/db.ts pg pool + transaction helpers; seed script migrates legacy Clerk-era schema (drop clerk_id, enforce UUID ids and unique email) - Add owner-gated admin API: stats, users, drivers CRUD, rides - Add dashboard/ Vite React owner dashboard (login, overview, users, fleet, rides) with dev-server proxy to avoid Expo CORS middleware - Add scripts/set-owner.mjs for role management
41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
import { Image, Text, View } from "react-native";
|
|
import { SafeAreaView } from "react-native-safe-area-context";
|
|
|
|
import { CustomButton } from "@/components/custom-button";
|
|
import { images } from "@/constants";
|
|
import { useSession } from "@/lib/session";
|
|
|
|
// Placeholder driver home. The driver experience (going online, accepting
|
|
// rides) is not built yet — drivers are registered here and managed in the
|
|
// database for now.
|
|
const DriverHome = () => {
|
|
const { signOut, user } = useSession();
|
|
|
|
return (
|
|
<SafeAreaView className="flex-1 bg-white justify-center items-center px-7">
|
|
<Image
|
|
source={images.check}
|
|
alt="Registered"
|
|
className="w-[110px] h-[110px] mb-5"
|
|
/>
|
|
|
|
<Text className="text-2xl font-JakartaBold text-center">
|
|
You're registered as a driver, {user?.name || "there"}!
|
|
</Text>
|
|
|
|
<Text className="text-base text-general-200 font-Jakarta text-center mt-3">
|
|
Driver mode is coming soon. We'll contact you at{" "}
|
|
{user?.email} once your account is activated.
|
|
</Text>
|
|
|
|
<CustomButton
|
|
title="Sign Out"
|
|
onPress={() => signOut()}
|
|
className="mt-10"
|
|
/>
|
|
</SafeAreaView>
|
|
);
|
|
};
|
|
|
|
export default DriverHome;
|