@@ -6,6 +6,7 @@ import { MediaPage } from './MediaPage';
6
6
import { CameraPage } from './CameraPage' ;
7
7
import type { Routes } from './Routes' ;
8
8
import { Camera , CameraPermissionStatus } from 'react-native-vision-camera' ;
9
+ import { GestureHandlerRootView } from 'react-native-gesture-handler' ;
9
10
10
11
const Stack = createNativeStackNavigator < Routes > ( ) ;
11
12
@@ -27,25 +28,27 @@ export function App(): React.ReactElement | null {
27
28
28
29
const showPermissionsPage = cameraPermission !== 'authorized' || microphonePermission === 'not-determined' ;
29
30
return (
30
- < NavigationContainer >
31
- < Stack . Navigator
32
- screenOptions = { {
33
- headerShown : false ,
34
- statusBarStyle : 'dark' ,
35
- animationTypeForReplace : 'push' ,
36
- } }
37
- initialRouteName = { showPermissionsPage ? 'PermissionsPage' : 'CameraPage' } >
38
- < Stack . Screen name = "PermissionsPage" component = { PermissionsPage } />
39
- < Stack . Screen name = "CameraPage" component = { CameraPage } />
40
- < Stack . Screen
41
- name = "MediaPage"
42
- component = { MediaPage }
43
- options = { {
44
- animation : 'none' ,
45
- presentation : 'transparentModal' ,
31
+ < GestureHandlerRootView style = { { flex : 1 } } >
32
+ < NavigationContainer >
33
+ < Stack . Navigator
34
+ screenOptions = { {
35
+ headerShown : false ,
36
+ statusBarStyle : 'dark' ,
37
+ animationTypeForReplace : 'push' ,
46
38
} }
47
- />
48
- </ Stack . Navigator >
49
- </ NavigationContainer >
39
+ initialRouteName = { showPermissionsPage ? 'PermissionsPage' : 'CameraPage' } >
40
+ < Stack . Screen name = "PermissionsPage" component = { PermissionsPage } />
41
+ < Stack . Screen name = "CameraPage" component = { CameraPage } />
42
+ < Stack . Screen
43
+ name = "MediaPage"
44
+ component = { MediaPage }
45
+ options = { {
46
+ animation : 'none' ,
47
+ presentation : 'transparentModal' ,
48
+ } }
49
+ />
50
+ </ Stack . Navigator >
51
+ </ NavigationContainer >
52
+ </ GestureHandlerRootView >
50
53
) ;
51
54
}
0 commit comments