From 93afb75619a02aa741b464634911b994620092be Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Sun, 28 Jul 2024 20:03:15 -0700
Subject: feat(mobile): Add ability to manage lists

---
 apps/mobile/app/_layout.tsx | 50 +++++++++++++++++++++++++--------------------
 1 file changed, 28 insertions(+), 22 deletions(-)

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

diff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsx
index a5aafb8c..f56aa810 100644
--- a/apps/mobile/app/_layout.tsx
+++ b/apps/mobile/app/_layout.tsx
@@ -3,6 +3,7 @@ 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";
 import { ShareIntentProvider, useShareIntent } from "expo-share-intent";
@@ -10,6 +11,7 @@ import { StatusBar } from "expo-status-bar";
 import { StyledStack } from "@/components/navigation/stack";
 import { Providers } from "@/lib/providers";
 import { cn } from "@/lib/utils";
+import { BottomSheetModalProvider } from "@gorhom/bottom-sheet";
 import { useColorScheme } from "nativewind";
 
 export default function RootLayout() {
@@ -28,28 +30,32 @@ export default function RootLayout() {
   return (
     <ShareIntentProvider>
       <Providers>
-        <View
-          className={cn(
-            "w-full flex-1 bg-gray-100 text-foreground dark:bg-background",
-            colorScheme == "dark" ? "dark" : "light",
-          )}
-        >
-          <StyledStack
-            contentClassName="bg-gray-100 dark:bg-background"
-            screenOptions={{
-              headerShown: false,
-            }}
-          >
-            <Stack.Screen name="index" />
-            <Stack.Screen
-              name="sharing"
-              options={{
-                presentation: "modal",
-              }}
-            />
-          </StyledStack>
-          <StatusBar style="auto" />
-        </View>
+        <GestureHandlerRootView style={{ flex: 1 }}>
+          <BottomSheetModalProvider>
+            <View
+              className={cn(
+                "w-full flex-1 bg-gray-100 text-foreground dark:bg-background",
+                colorScheme == "dark" ? "dark" : "light",
+              )}
+            >
+              <StyledStack
+                contentClassName="bg-gray-100 dark:bg-background"
+                screenOptions={{
+                  headerShown: false,
+                }}
+              >
+                <Stack.Screen name="index" />
+                <Stack.Screen
+                  name="sharing"
+                  options={{
+                    presentation: "modal",
+                  }}
+                />
+              </StyledStack>
+              <StatusBar style="auto" />
+            </View>
+          </BottomSheetModalProvider>
+        </GestureHandlerRootView>
       </Providers>
     </ShareIntentProvider>
   );
-- 
cgit v1.2.3-70-g09d2

