-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
51 lines (46 loc) · 1.32 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 "react-native-gesture-handler";
import { Provider } from "react-redux";
import { StatusBar } from "expo-status-bar";
import { NativeBaseProvider } from "native-base";
import { QueryClientProvider } from "react-query";
import { PersistGate } from "redux-persist/integration/react";
import {
useFonts,
Inter_200ExtraLight,
Inter_300Light,
Inter_400Regular,
Inter_500Medium,
Inter_600SemiBold,
Inter_700Bold,
} from "@expo-google-fonts/inter";
import { Loading } from "@components/Loading";
import { queryClient } from "@infra/lib/query-client";
import { persistor, store } from "@store/index";
import { Routes } from "./src/routes";
import { theme } from "@styles/theme";
export default function App() {
const [fontsLoaded] = useFonts({
InterExtraLight: Inter_200ExtraLight,
InterLight: Inter_300Light,
InterRegular: Inter_400Regular,
InterMedium: Inter_500Medium,
InterSemiBold: Inter_600SemiBold,
InterBold: Inter_700Bold,
});
return (
<NativeBaseProvider theme={theme}>
{!fontsLoaded ? (
<Loading />
) : (
<Provider store={store}>
<PersistGate persistor={persistor} loading={<Loading />}>
<QueryClientProvider client={queryClient}>
<StatusBar style="light" />
<Routes />
</QueryClientProvider>
</PersistGate>
</Provider>
)}
</NativeBaseProvider>
);
}