anisav-mobile/app/_layout.tsx

34 lines
1.3 KiB
TypeScript

import { Stack } from 'expo-router'
import { StatusBar } from 'expo-status-bar'
import { SafeAreaProvider } from 'react-native-safe-area-context'
import { GestureHandlerRootView } from 'react-native-gesture-handler'
import { AuthProvider } from '../src/lib/AuthContext'
import { colors } from '../src/lib/theme'
export default function RootLayout() {
return (
<GestureHandlerRootView style={{ flex: 1, backgroundColor: colors.background }}>
<SafeAreaProvider>
<AuthProvider>
<StatusBar style="light" />
<Stack screenOptions={{ headerShown: false, contentStyle: { backgroundColor: colors.background } }}>
<Stack.Screen name="(tabs)" />
<Stack.Screen
name="title/[id]"
options={{
presentation: 'card',
headerShown: true,
headerTitle: '',
headerBackTitle: '',
headerStyle: { backgroundColor: colors.background },
headerTintColor: colors.text,
headerShadowVisible: false,
}}
/>
<Stack.Screen name="login" options={{ presentation: 'modal' }} />
</Stack>
</AuthProvider>
</SafeAreaProvider>
</GestureHandlerRootView>
)
}