-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path_layout.tsx
More file actions
44 lines (40 loc) · 1.3 KB
/
_layout.tsx
File metadata and controls
44 lines (40 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import { DarkTheme, DefaultTheme, ThemeProvider } from "@react-navigation/native";
import React, { useCallback, useEffect, useState } from "react";
import ReactNative, { useColorScheme } from "react-native";
import { Stack } from "expo-router";
import { AnimatedSplashOverlay } from "@/components/animated-icon";
import { View, StyleSheet } from "react-native";
import { ReactNativeGrabRoot } from "react-native-grab";
export default function MainLayout() {
const colorScheme = useColorScheme();
return (
<ReactNativeGrabRoot>
<ThemeProvider value={colorScheme === "dark" ? DarkTheme : DefaultTheme}>
<AnimatedSplashOverlay />
<View style={styles.appContent}>
<Stack>
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
<Stack.Screen name="modal" options={{ presentation: "modal", title: "Modal" }} />
<Stack.Screen
name="context-playground"
options={{ presentation: "modal", title: "Context Playground" }}
/>
</Stack>
</View>
</ThemeProvider>
</ReactNativeGrabRoot>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
appContent: {
flex: 1,
},
overlay: {
zIndex: 9999,
elevation: 9999,
backgroundColor: "transparent",
},
});