-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
58 lines (52 loc) · 2 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import {NavigationContainer} from '@react-navigation/native';
import React, {useEffect} from 'react';
import {SafeAreaView, StatusBar, LogBox} from 'react-native';
import AddCollectionModal from './src/components/AddCollectionModal';
import AddToCollectionModal from './src/components/AddToCollectionModal';
import {useStyleProcessor} from './src/hooks/useStyleProcessor';
import RootNavigation from './src/RootNavigation';
import colors from './src/constants/colors';
import Toast from 'react-native-toast-message';
import AddListModal from './src/components/AddListModal';
import AddToListModal from './src/components/AddToListModal';
import ConfirmDeleteModal from './src/components/common/ConfirmDeleteModal';
import toastConfig from './src/utils/ToastConfig';
import SearchUserModal from './src/components/SearchUserModal';
import CustomImageViewer from './src/components/CustomImageViewer';
import Orientation from 'react-native-orientation';
import RedirectConfirmationModal from './src/components/RedirectConfirmationModal';
const ENABLE_YELLOW_BOX_IN_DEBUG_MODE = true;
function App() {
const localStyle = useStyleProcessor(styles, 'App');
useEffect(() => {
Orientation.lockToPortrait();
}, []);
if (ENABLE_YELLOW_BOX_IN_DEBUG_MODE) {
LogBox.ignoreLogs(['Warning: ...']); // Ignore log notification by message
LogBox.ignoreAllLogs(); //Ignore all log notifications
}
return (
<SafeAreaView style={localStyle.container}>
<StatusBar barStyle={'dark-content'} backgroundColor={colors.White} />
<NavigationContainer>
<RootNavigation />
<AddCollectionModal />
<AddToCollectionModal />
<ConfirmDeleteModal />
<AddListModal />
<SearchUserModal />
<AddToListModal />
<CustomImageViewer />
<RedirectConfirmationModal />
</NavigationContainer>
<Toast config={toastConfig} />
</SafeAreaView>
);
}
const styles = {
container: {
flex: 1,
backgroundColor: colors.White,
},
};
export default React.memo(App);