diff --git a/mobile/app.json b/mobile/app.json index bd312b6..64945eb 100644 --- a/mobile/app.json +++ b/mobile/app.json @@ -10,9 +10,26 @@ "**/*" ], "ios": { - "supportsTablet": false + "supportsTablet": false, + "bundleIdentifier": "com.discoverly.app" + }, + "android": { + "package": "com.discoverly.app", + "intentFilters": [ + { + "action": "VIEW", + "data": [ + { + "scheme": "discoverly" + } + ], + "category": [ + "BROWSABLE", + "DEFAULT" + ] + } + ] }, - "android": {}, "web": { "bundler": "metro" }, diff --git a/mobile/app/(auth)/_layout.tsx b/mobile/app/(auth)/_layout.tsx new file mode 100644 index 0000000..949e0b3 --- /dev/null +++ b/mobile/app/(auth)/_layout.tsx @@ -0,0 +1,21 @@ +import { Redirect, Stack } from "expo-router" +import { useAuthStore } from "../../src/store/useAuthStore" + +export default function AuthLayout() { + const token = useAuthStore((state) => state.token) + + if (token) { + return + } + + return ( + + + + + ) +} diff --git a/mobile/app/(auth)/login.tsx b/mobile/app/(auth)/login.tsx index 1f6159a..02109ce 100644 --- a/mobile/app/(auth)/login.tsx +++ b/mobile/app/(auth)/login.tsx @@ -10,6 +10,7 @@ import { type LoginFormValues, loginSchema } from "../../src/validation/auth" export default function LoginScreen() { const router = useRouter() const setToken = useAuthStore((state) => state.setToken) + const { control, handleSubmit, @@ -43,6 +44,7 @@ export default function LoginScreen() { Sign in to continue matching with dishes around you. + )} /> + )} /> +