summaryrefslogtreecommitdiffstats
path: root/app/_layout.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'app/_layout.tsx')
-rw-r--r--app/_layout.tsx24
1 files changed, 24 insertions, 0 deletions
diff --git a/app/_layout.tsx b/app/_layout.tsx
new file mode 100644
index 0000000..f518c9b
--- /dev/null
+++ b/app/_layout.tsx
@@ -0,0 +1,24 @@
+import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native';
+import { Stack } from 'expo-router';
+import { StatusBar } from 'expo-status-bar';
+import 'react-native-reanimated';
+
+import { useColorScheme } from '@/hooks/use-color-scheme';
+
+export const unstable_settings = {
+ anchor: '(tabs)',
+};
+
+export default function RootLayout() {
+ const colorScheme = useColorScheme();
+
+ return (
+ <ThemeProvider value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
+ <Stack>
+ <Stack.Screen name="(tabs)" options={{ headerShown: false }} />
+ <Stack.Screen name="modal" options={{ presentation: 'modal', title: 'Modal' }} />
+ </Stack>
+ <StatusBar style="auto" />
+ </ThemeProvider>
+ );
+}