This commit is contained in:
Bastien COIGNOUX
2026-05-03 20:18:33 +02:00
parent ffc2e6b895
commit bd325fe456
113 changed files with 29532 additions and 220 deletions

21
mb-app/app/index.tsx Normal file
View File

@ -0,0 +1,21 @@
import { Redirect } from 'expo-router';
import { ActivityIndicator, View } from 'react-native';
import { useAuth } from '@/context/AuthContext';
export default function Index() {
const { initialized, session } = useAuth();
if (!initialized) {
return (
<View className="flex-1 items-center justify-center bg-slate-50">
<ActivityIndicator size="large" color="#1D4ED8" />
</View>
);
}
if (session?.user) {
return <Redirect href="/(tabs)" />;
}
return <Redirect href="/auth/login" />;
}