-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.js
102 lines (96 loc) · 2.34 KB
/
Main.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
import * as React from 'react';
import {
configureFonts,
DefaultTheme as PaperDefaultTheme,
Provider as PaperProvider,
} from 'react-native-paper';
import {DefaultTheme as NavigationDefaulTheme} from '@react-navigation/native';
import App from './src/App';
import merge from 'deepmerge';
import {PRIMARY_COLOR, PRIMARY_COLOR_DARK} from './src/assets/static/colors';
import firebase from '@react-native-firebase/app';
import {BOLD_TEXT, REGULAR_TEXT} from './src/assets/static/fonts';
const fontConfig = {
web: {
regular: {
fontFamily: REGULAR_TEXT,
fontWeight: 'normal',
},
medium: {
fontFamily: BOLD_TEXT,
fontWeight: 'normal',
},
light: {
fontFamily: REGULAR_TEXT,
fontWeight: 'normal',
},
thin: {
fontFamily: REGULAR_TEXT,
fontWeight: 'normal',
},
},
ios: {
regular: {
fontFamily: REGULAR_TEXT,
fontWeight: 'normal',
},
medium: {
fontFamily: BOLD_TEXT,
fontWeight: 'normal',
},
light: {
fontFamily: REGULAR_TEXT,
fontWeight: 'normal',
},
thin: {
fontFamily: REGULAR_TEXT,
fontWeight: 'normal',
},
},
android: {
regular: {
fontFamily: REGULAR_TEXT,
fontWeight: 'normal',
},
medium: {
fontFamily: BOLD_TEXT,
fontWeight: 'normal',
},
light: {
fontFamily: REGULAR_TEXT,
fontWeight: 'normal',
},
thin: {
fontFamily: REGULAR_TEXT,
fontWeight: 'normal',
},
},
};
const theme = {
...PaperDefaultTheme,
fonts: configureFonts(fontConfig),
colors: {
...PaperDefaultTheme.colors,
primary: PRIMARY_COLOR,
},
};
const CombinedDefaultTheme = merge(theme, NavigationDefaulTheme);
const firebaseConfig = {
apiKey: 'AIzaSyByVmJZHLKdW9vGO6n5OfrO7BUw1ZGuwTY',
authDomain: 'astro-hub-hkm.firebaseapp.com',
databaseURL: 'https://astro-hub-hkm-default-rtdb.firebaseio.com',
projectId: 'astro-hub-hkm',
storageBucket: 'astro-hub-hkm.appspot.com',
messagingSenderId: '1058723292471',
appId: '1:1058723292471:web:35f7436297af7d6539e6b2',
measurementId: 'G-VTD37LJWYW',
};
if (!firebase.apps.length) firebase.initializeApp(firebaseConfig);
else firebase.app;
export default function Main() {
return (
<PaperProvider theme={CombinedDefaultTheme}>
<App theme={CombinedDefaultTheme} />
</PaperProvider>
);
}