ki integration
This commit is contained in:
20
client/src/app/(auth)/_layout.tsx
Normal file
20
client/src/app/(auth)/_layout.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
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 },
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user