18 lines
508 B
TypeScript
18 lines
508 B
TypeScript
import { Stack } from "expo-router";
|
|
import { Appearance } from "react-native";
|
|
import {Colors} from "@/constants/Colors"
|
|
|
|
export default function RootLayout() {
|
|
const colorScheme = Appearance.getColorScheme();
|
|
|
|
const theme = colorScheme === 'dark' ? Colors.dark :
|
|
Colors.light;
|
|
return <Stack screenOptions={{ headerStyle: {backgroundColor:theme.background},
|
|
headerTintColor: theme.text
|
|
}}>
|
|
<Stack.Screen name="index"/>
|
|
<Stack.Screen name="+not-found" options={{headerShown:false}}/>
|
|
|
|
</Stack>;
|
|
}
|