diff --git a/apps/expo/.env.development b/apps/expo/.env.development new file mode 100644 index 00000000..af475f13 --- /dev/null +++ b/apps/expo/.env.development @@ -0,0 +1,3 @@ + +EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_ZXRoaWNhbC1zbmFwcGVyLTk0LmNsZXJrLmFjY291bnRzLmRldiQ +EXPO_PUBLIC_API_URL="localhost:3000" \ No newline at end of file diff --git a/apps/expo/app.config.ts b/apps/expo/app.config.ts index e1b5f479..8b0a9244 100644 --- a/apps/expo/app.config.ts +++ b/apps/expo/app.config.ts @@ -32,6 +32,7 @@ const defineConfig = (): ExpoConfig => ({ eas: { projectId: "e5b5d2cd-098b-4fe4-85ed-ac05e395552d", // dennis' project id for now }, + clerkPublishableKey: process.env.CLERK_PUBLISHABLE_KEY, }, experiments: { tsconfigPaths: true, diff --git a/apps/expo/package.json b/apps/expo/package.json index 6704c97f..332cf55a 100644 --- a/apps/expo/package.json +++ b/apps/expo/package.json @@ -15,6 +15,7 @@ "typecheck": "tsc --noEmit" }, "dependencies": { + "@clerk/clerk-expo": "^1.1.4", "@expo/metro-config": "^0.17.6", "@react-native-async-storage/async-storage": "1.21.0", "@react-native-community/datetimepicker": "7.6.1", @@ -52,6 +53,7 @@ "react-native-svg": "^15.1.0", "superjson": "2.2.1", "tamagui": "^1.94.4", + "zod": "^3.22.4", "zustand": "^4.5.2" }, "devDependencies": { diff --git a/apps/expo/src/app/_layout.tsx b/apps/expo/src/app/_layout.tsx index 70b4a634..e9ebb11a 100644 --- a/apps/expo/src/app/_layout.tsx +++ b/apps/expo/src/app/_layout.tsx @@ -8,6 +8,7 @@ import { useSafeAreaInsets } from "react-native-safe-area-context"; import { useFonts } from "expo-font"; import { Stack } from "expo-router"; import { StatusBar } from "expo-status-bar"; +import { ClerkProvider } from "@clerk/clerk-expo"; import InterBold from "@tamagui/font-inter/otf/Inter-Bold.otf"; import Inter from "@tamagui/font-inter/otf/Inter-Medium.otf"; import { ToastProvider, ToastViewport } from "@tamagui/toast"; @@ -15,6 +16,7 @@ import { createTamagui, TamaguiProvider, Theme } from "tamagui"; import { HamburgerMenu, Logo } from "~/components"; import { TRPCProvider } from "~/utils"; +import { env } from "../utils/env"; // Main layout of the app // It wraps your pages with the providers they need @@ -37,37 +39,39 @@ export default function RootLayout() { return ( - - - , - headerRight: () => , - headerStyle: { - backgroundColor: "#1A1B1D", - }, - contentStyle: { - backgroundColor: - colorScheme === "dark" ? "#1A1B1D" : "#FFFFFF", - }, - }} - > - {/* + + + , + headerRight: () => , + headerStyle: { + backgroundColor: "#1A1B1D", + }, + contentStyle: { + backgroundColor: + colorScheme === "dark" ? "#1A1B1D" : "#FFFFFF", + }, + }} + > + {/* */} - - - - - + + + + + + ); diff --git a/apps/expo/src/app/auth/index.tsx b/apps/expo/src/app/auth/index.tsx new file mode 100644 index 00000000..8debec41 --- /dev/null +++ b/apps/expo/src/app/auth/index.tsx @@ -0,0 +1,5 @@ +import { Text } from "tamagui"; + +export default function Auth() { + return Auth; +} diff --git a/apps/expo/src/app/home/_components/dish-card.tsx b/apps/expo/src/app/home/_components/dish-card.tsx new file mode 100644 index 00000000..89052ac5 --- /dev/null +++ b/apps/expo/src/app/home/_components/dish-card.tsx @@ -0,0 +1,80 @@ +import { Link } from "expo-router"; +import { StarFull } from "@tamagui/lucide-icons"; +import { Image, ListItem, Text, XStack, YGroup, YStack } from "tamagui"; + +import type { MenuWithRelations } from "@zotmeal/db"; + +import { PinButton } from "~/components"; + +type Station = MenuWithRelations["stations"][0]; +type Dish = MenuWithRelations["stations"][0]["dishes"][0]; + +export const DishCard = ({ + dish, + stationId, +}: Readonly<{ + dish: Dish; + stationId: Station["id"]; +}>) => ( + + + + + + + + + {dish.name} + + + {dish.nutritionInfo.calories} cal + + + + + + + + 5.0 + {" "} + (10,000 reviews) + + + + + + + + + +); diff --git a/apps/expo/src/app/home/_components/event-toast.tsx b/apps/expo/src/app/home/_components/event-toast.tsx new file mode 100644 index 00000000..d0be58e8 --- /dev/null +++ b/apps/expo/src/app/home/_components/event-toast.tsx @@ -0,0 +1,52 @@ +import { Link } from "expo-router"; +import { ArrowRight, CalendarDays } from "@tamagui/lucide-icons"; +import { Toast, useToastState } from "@tamagui/toast"; +import { Button } from "tamagui"; +import { LinearGradient } from "tamagui/linear-gradient"; + + + +export function EventToast() { + const currentToast = useToastState(); + if (!currentToast || currentToast.isHandledNatively) return null; + return ( + + + {currentToast.title} + + + +