From f4b2bac6b0749e5924f9e9e789cc361a17427364 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Mon, 16 Dec 2024 00:26:12 +0000
Subject: ui(mobile): Make page titles more native

---
 apps/mobile/app/_layout.tsx | 59 +++++++++++++++++++++------------------------
 1 file changed, 27 insertions(+), 32 deletions(-)

(limited to 'apps/mobile/app/_layout.tsx')

diff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsx
index 3a8f99a1..b2688388 100644
--- a/apps/mobile/app/_layout.tsx
+++ b/apps/mobile/app/_layout.tsx
@@ -2,7 +2,6 @@ import "@/globals.css";
 import "expo-dev-client";
 
 import { useEffect } from "react";
-import { View } from "react-native";
 import { GestureHandlerRootView } from "react-native-gesture-handler";
 import { useRouter } from "expo-router";
 import { Stack } from "expo-router/stack";
@@ -36,42 +35,38 @@ export default function RootLayout() {
     <GestureHandlerRootView style={{ flex: 1 }}>
       <ShareIntentProvider>
         <Providers>
-          <View
-            className={cn(
+          <StyledStack
+            contentClassName={cn(
               "w-full flex-1 bg-gray-100 text-foreground dark:bg-background",
               colorScheme == "dark" ? "dark" : "light",
             )}
+            screenOptions={{
+              headerTitle: "",
+              headerTransparent: true,
+            }}
           >
-            <StyledStack
-              contentClassName="bg-gray-100 dark:bg-background"
-              screenOptions={{
-                headerShown: false,
-                headerTransparent: true,
+            <Stack.Screen name="index" />
+            <Stack.Screen
+              name="signin"
+              options={{
+                headerShown: true,
+                headerBackVisible: true,
+                headerBackTitle: "Back",
+                title: "",
               }}
-            >
-              <Stack.Screen name="index" />
-              <Stack.Screen
-                name="signin"
-                options={{
-                  headerShown: true,
-                  headerBackVisible: true,
-                  headerBackTitle: "Back",
-                  title: "",
-                }}
-              />
-              <Stack.Screen name="server-address" />
-              <Stack.Screen name="sharing" />
-              <Stack.Screen
-                name="test-connection"
-                options={{
-                  title: "Test Connection",
-                  headerShown: true,
-                  presentation: "modal",
-                }}
-              />
-            </StyledStack>
-            <StatusBar style="auto" />
-          </View>
+            />
+            <Stack.Screen name="server-address" />
+            <Stack.Screen name="sharing" />
+            <Stack.Screen
+              name="test-connection"
+              options={{
+                title: "Test Connection",
+                headerShown: true,
+                presentation: "modal",
+              }}
+            />
+          </StyledStack>
+          <StatusBar style="auto" />
         </Providers>
       </ShareIntentProvider>
     </GestureHandlerRootView>
-- 
cgit v1.2.3-70-g09d2

