Files
CityExplorer/app/_layout.tsx
2025-04-09 20:37:52 +02:00

31 lines
936 B
TypeScript

import { Stack } from 'expo-router';
import { useColorScheme } from 'react-native';
import { PaperProvider} from 'react-native-paper';
import { MD3LightTheme, MD3DarkTheme } from 'react-native-paper';
const colorScheme = useColorScheme();
const theme = colorScheme === 'dark' ? MD3DarkTheme :
MD3LightTheme;
export default function RootLayout() {
return (
<PaperProvider theme={theme} >
<Stack screenOptions={{
headerStyle: {
backgroundColor: theme.colors.primaryContainer,
borderBottomWidth:0
},
headerTintColor: theme.colors.primary,
}}>
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
<Stack.Screen
name="location/[id]"
options={{
title: "Lokalizacja",
headerBackTitle: "Powrót",
}}/>
</Stack>
</PaperProvider>
);
}