-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
51 lines (46 loc) · 1.66 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
import { NativeBaseProvider } from 'native-base';
import { QueryClientProvider } from '@tanstack/react-query';
import { queryClient } from 'src/store/lib';
import { Routes } from 'src/routes';
import { theme } from 'src/theme';
import { AuthProvider } from 'src/contexts/auth';
import * as Font from 'expo-font';
import { useEffect } from 'react';
import PoppinsRegular from './assets/fonts/Poppins-Regular.ttf';
import PoppinsBold from './assets/fonts/Poppins-Bold.ttf';
import PoppinsSemiBold from './assets/fonts/Poppins-SemiBold.ttf';
import PoppinsMedium from './assets/fonts/Poppins-Medium.ttf';
import PoppinsExtraLight from './assets/fonts/Poppins-ExtraLight.ttf';
import PoppinsLight from './assets/fonts/Poppins-Light.ttf';
import PoppinsThin from './assets/fonts/Poppins-Thin.ttf';
import PoppinsExtraBold from './assets/fonts/Poppins-ExtraBold.ttf';
import PoppinsBlack from './assets/fonts/Poppins-Black.ttf';
import 'src/utils/socket';
function App() {
const fetchFonts = async () => {
Font.loadAsync({
'Poppins-Regular': PoppinsRegular,
'Poppins-Bold': PoppinsBold,
'Poppins-Thin': PoppinsThin,
'Poppins-Light': PoppinsLight,
'Poppins-Black': PoppinsBlack,
'Poppins-Medium': PoppinsMedium,
'Poppins-SemiBold': PoppinsSemiBold,
'Poppins-ExtraBold': PoppinsExtraBold,
'Poppins-ExtraLight': PoppinsExtraLight,
});
};
useEffect(() => {
fetchFonts();
}, []);
return (
<NativeBaseProvider theme={theme}>
<QueryClientProvider client={queryClient}>
<AuthProvider>
<Routes />
</AuthProvider>
</QueryClientProvider>
</NativeBaseProvider>
);
}
export default App;