feat : Structure de base
This commit is contained in:
12
src/app/(tabs)/_layout.tsx
Normal file
12
src/app/(tabs)/_layout.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { useAuth } from '@/stores/authStore';
|
||||
import { Redirect, Stack } from 'expo-router';
|
||||
|
||||
export default function TabsLayout() {
|
||||
const session = useAuth((state) => state.session);
|
||||
|
||||
if (!session) return <Redirect href="../(auth)/login" />;
|
||||
|
||||
if (session.role === 'org') return <Redirect href="../(org)" />;
|
||||
|
||||
return <Stack screenOptions={{ headerShown: false}} />;
|
||||
}
|
||||
Reference in New Issue
Block a user