-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
34 lines (29 loc) · 1.01 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
import React from 'react';
import { Text } from 'react-native';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { useFonts } from 'expo-font';
import { DMSans_400Regular, DMSans_700Bold } from '@expo-google-fonts/dm-sans';
import { DefaultTheme } from '@react-navigation/native';
import { AuthContextProvider } from '@/context/AuthContext';
import AppNavigator from '@/navigation/AppNavigator';
import colors from '@/styles/colors';
DefaultTheme.colors.background = colors.white;
export default function App() {
const [fontsLoaded] = useFonts({
DMSans_400Regular,
DMSans_700Bold,
});
if (!fontsLoaded) {
return null;
}
const defaultFontFamily = 'DMSans_400Regular';
(Text as any).defaultProps = (Text as any).defaultProps || {};
(Text as any).defaultProps.style = { fontFamily: defaultFontFamily };
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<AuthContextProvider>
<AppNavigator />
</AuthContextProvider>
</GestureHandlerRootView>
);
}