-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
71 lines (57 loc) · 1.53 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
59
60
61
62
63
64
65
66
67
68
69
70
71
import React, { useEffect } from 'react';
import {
DarkTheme,
DefaultTheme,
NavigationContainer
} from '@react-navigation/native';
import MainStackNavigation from './src/navigation';
import {
LogBox,
useColorScheme
} from 'react-native';
import codePush from "react-native-code-push";
const codePushOptions = {
checkFrequency: codePush.CheckFrequency.ON_APP_START
}
function App() {
useEffect(() => {
codePush.sync({
updateDialog: true,
installMode: codePush.InstallMode.IMMEDIATE
});
}, []);
const scheme = useColorScheme();
LogBox.ignoreLogs([
"[react-native-gesture-handler] Seems like you\'re using an old API with gesture components, check out new Gestures system!",
]);
const myDefaultTheme = {
...DefaultTheme,
colors: {
primary: '#DE5727',
background: '#F1F1F1',
card: '#FFFFFF', // The background color of card-like elements, such as headers, tab bars etc.
text: '#0A2D4D',
border: '#D4D4D4',
notification: '#DE5727'
}
}
const myDarkTheme = {
...DarkTheme,
colors: {
primary: '#DE5727',
background: '#000000',
card: '#000000', // The background color of card-like elements, such as headers, tab bars etc.
text: '#FFFFFF',
border: '#D4D4D4',
notification: '#DE5727'
}
}
return (
<NavigationContainer
theme={scheme === 'dark' ? myDarkTheme : myDefaultTheme}
>
<MainStackNavigation />
</NavigationContainer>
)
}
export default codePush(codePushOptions)(App);