21 lines
489 B
TypeScript
21 lines
489 B
TypeScript
import { Redirect, Stack } from 'expo-router';
|
|
|
|
import { useSession } from '@/lib/session';
|
|
import { colors } from '@/theme/tokens';
|
|
|
|
export default function AuthLayout() {
|
|
const { laedt, konto } = useSession();
|
|
|
|
if (laedt) return null; // Splash bleibt stehen, bis die Session geklärt ist
|
|
if (konto) return <Redirect href="/" />;
|
|
|
|
return (
|
|
<Stack
|
|
screenOptions={{
|
|
headerShown: false,
|
|
contentStyle: { backgroundColor: colors.bg },
|
|
}}
|
|
/>
|
|
);
|
|
}
|