From e9a76baf90da9263769d673702610220acdc13dc Mon Sep 17 00:00:00 2001 From: Nemo Date: Tue, 24 Mar 2026 14:01:20 +0800 Subject: [PATCH] fix: add GestureHandlerRootView to root layout; install react-native-gesture-handler --- app/_layout.tsx | 9 ++++++--- package.json | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/_layout.tsx b/app/_layout.tsx index 5e5fd36..943ccc6 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -2,6 +2,7 @@ import '../global.css'; import { useEffect } from 'react'; import { Stack, router } from 'expo-router'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { GestureHandlerRootView } from 'react-native-gesture-handler'; import { useAuthStore } from '../stores/authStore'; const queryClient = new QueryClient(); @@ -24,8 +25,10 @@ export default function RootLayout() { }, [isLoading, token]); return ( - - - + + + + + ); } diff --git a/package.json b/package.json index c4b422f..bff6313 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "nativewind": "^4.1.23", "react": "19.1.0", "react-native": "0.81.5", + "react-native-gesture-handler": "~2.28.0", "react-native-maps": "1.20.1", "react-native-reanimated": "~4.1.1", "react-native-safe-area-context": "~5.6.0",