-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
44 lines (38 loc) · 1.33 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import React,{useEffect} from 'react';
import { NavigationContainer } from '@react-navigation/native';
import Main from './Component/Main';
import { createStackNavigator } from '@react-navigation/stack';
import Setting from './Component/Setting';
import History from './Component/History';
import SplashScreen from 'react-native-splash-screen';
import { BackHandler } from 'react-native';
import HOC from './hoc/HOC';
const Stack = createStackNavigator();
export default function App() {
const devmode = false;
//스플래시 액티비티 종료
useEffect(() => {
SplashScreen.hide();
}, []);
//Android HardWareButton Locked
useEffect(() => {
BackHandler.addEventListener('hardwareBackPress', () => true)
return () =>
BackHandler.removeEventListener('hardwareBackPress', () => true)
}, [])
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name="Main"
component={HOC(Main,devmode)}
options={{headerShown : false}} />
<Stack.Screen name="Setting"
component={HOC(Setting,devmode)}
options={{headerShown : false}} />
<Stack.Screen name="History"
component={HOC(History,devmode)}
options={{headerShown : false}} />
</Stack.Navigator>
</NavigationContainer>
);
}