-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.jsx
66 lines (61 loc) · 1.92 KB
/
App.jsx
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
if (__DEV__) {
require('./ReactotronConfig');
}
import { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
import { NavigationContainer } from '@react-navigation/native';
import React from 'react';
import { StatusBar, View } from 'react-native';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import Toast, { BaseToast, ErrorToast } from 'react-native-toast-message';
import { TEXT_COLORS } from './src/constants/colors';
import { COLORS } from './src/constants/colors';
import { FONTS } from './src/constants/font';
import useNotificationUpdates from './src/hooks/useNotificationUpdates';
import Router from './src/router';
const toastConfig = {
success: (props) => (
<BaseToast
{...props}
style={{ borderLeftColor: '#13C670', backgroundColor: 'rgba(60,60,60,1)' }}
contentContainerStyle={{ paddingHorizontal: 15 }}
text1Style={{
fontSize: 17,
color: TEXT_COLORS.primary,
fontFamily: FONTS.PRETENDARD[400],
}}
/>
),
error: (props) => (
<ErrorToast
{...props}
style={{ borderLeftColor: '#DB4242', backgroundColor: 'rgba(60,60,60,1)' }}
text1Style={{
fontSize: 17,
color: TEXT_COLORS.primary,
fontFamily: FONTS.PRETENDARD[400],
}}
text2Style={{
fontSize: 15,
color: TEXT_COLORS.primary,
fontFamily: FONTS.PRETENDARD[400],
}}
/>
),
};
function App() {
useNotificationUpdates();
return (
<View style={{ flex: 1 }}>
<GestureHandlerRootView>
<StatusBar barStyle="light-content" backgroundColor={COLORS.darkBackground} />
<NavigationContainer theme={{ colors: { background: COLORS.darkBackground } }}>
<BottomSheetModalProvider>
<Router />
<Toast config={toastConfig} />
</BottomSheetModalProvider>
</NavigationContainer>
</GestureHandlerRootView>
</View>
);
}
export default App;