This commit is contained in:
2026-04-25 11:14:11 +02:00
parent 6f238b4d80
commit 72b45335dd
10 changed files with 271 additions and 29 deletions

View File

@@ -0,0 +1,18 @@
import { Stack, useRouter } from "expo-router";
import { useAuth } from "@/context/auth-context";
import { useEffect } from "react";
export default function AuthLayout() {
const { user } = useAuth();
const router = useRouter();
useEffect(() => {
if (user) {
router.replace("/(tabs)");
} else {
router.replace("/(auth)/login");
}
}, [user]);
return <Stack />;
}