-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
68 lines (62 loc) · 1.4 KB
/
App.tsx
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
import React from 'react';
import 'react-native-gesture-handler';
import { StyleSheet, StatusBar, View } from 'react-native';
import { Provider as ReduxProvider } from 'react-redux';
import AppLoading from 'expo-app-loading';
import {
useFonts,
Poppins_400Regular,
Poppins_700Bold
} from '@expo-google-fonts/poppins';
import { Provider as PaperProvider, DefaultTheme } from 'react-native-paper';
import store from './src/state/store';
import App from './src';
import { fonts, colors, space } from 'src/constants';
const styles = StyleSheet.create({
app: {
paddingTop: StatusBar.currentHeight,
height: '100%',
fontFamily: fonts.regular
}
});
const theme: typeof DefaultTheme = {
...DefaultTheme,
roundness: space.xs,
colors: {
...DefaultTheme.colors,
primary: colors.black,
accent: colors.green
},
fonts: {
regular: {
fontFamily: fonts.regular
},
medium: {
fontFamily: fonts.regular
},
light: {
fontFamily: fonts.regular
},
thin: {
fontFamily: fonts.regular
}
}
};
export default () => {
const [fontsLoaded] = useFonts({
Poppins_400Regular,
Poppins_700Bold
});
if (!fontsLoaded) {
return <AppLoading />;
}
return (
<ReduxProvider store={store}>
<PaperProvider theme={theme}>
<View style={styles.app}>
<App />
</View>
</PaperProvider>
</ReduxProvider>
);
};