MCPcopy Create free account
hub / github.com/code100x/chess / RootLayoutNav

Function RootLayoutNav

apps/native/app/_layout.tsx:8–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6// import Loading from "../components/loading";
7
8export default function RootLayoutNav() {
9 useEffect(() => {
10 router.replace('/login');
11 }, []);
12
13 return (
14 <GestureHandlerRootView style={{ flex: 1 }}>
15 <SafeAreaProvider>
16 <Stack
17 // https://reactnavigation.org/docs/headers#sharing-common-options-across-screens
18 screenOptions={{
19 headerStyle: { backgroundColor: PRIMARY_BROWN },
20 headerTintColor: '#fff',
21 headerTitleStyle: {
22 fontWeight: '600',
23 fontSize: 18,
24 },
25 headerTitleAlign: 'center',
26 headerShadowVisible: false,
27 }}
28 >
29 <Stack.Screen
30 name="index"
31 options={{
32 headerTitle: `100X Chess`,
33 }}
34 />
35 <Stack.Screen
36 name="game/index"
37 options={{
38 headerTitle: `100X Chess`,
39 }}
40 />
41
42 {/* <Stack.Screen name="chessboard" options={{ headerShown: false }} /> */}
43 </Stack>
44 </SafeAreaProvider>
45 </GestureHandlerRootView>
46 );
47}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected