feat(mobile): register /call full-screen modal route

This commit is contained in:
byGalax
2026-05-14 06:12:50 +02:00
parent b81c63a2d3
commit c2df741055
+10 -5
View File
@@ -2,13 +2,18 @@ import { Redirect, Stack } from 'expo-router';
import { useAuth } from '../../lib/authContext';
// Guard for the authenticated route group. While the AuthProvider is
// hydrating from AsyncStorage we render nothing (a brief blank frame)
// rather than flashing the login screen and then snapping into the chat
// list — that's a worse UX than a 200ms blank.
export default function AppLayout() {
const { session, loading } = useAuth();
if (loading) return null;
if (!session) return <Redirect href="/" />;
return <Stack screenOptions={{ headerShown: true }} />;
return (
<Stack screenOptions={{ headerShown: true }}>
<Stack.Screen name="chats" />
<Stack.Screen name="conversations/[id]" />
<Stack.Screen
name="call"
options={{ headerShown: false, presentation: 'fullScreenModal' }}
/>
</Stack>
);
}