fix: add GestureHandlerRootView to root layout; install react-native-gesture-handler
This commit is contained in:
@@ -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 (
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<Stack screenOptions={{ headerShown: false }} />
|
||||
</QueryClientProvider>
|
||||
<GestureHandlerRootView style={{ flex: 1 }}>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<Stack screenOptions={{ headerShown: false }} />
|
||||
</QueryClientProvider>
|
||||
</GestureHandlerRootView>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user