-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
30 lines (28 loc) · 1.05 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
import { ThemeProvider } from "@emotion/react";
import { NavigationContainer } from "@react-navigation/native";
import { Navigator } from "@src/navigation/Navigator.navigator";
import { queryClient } from "@src/shared/infra/clients/queryClient";
import { QueryBoundaries } from "@src/shared/view/components/QueryBoundaries/QueryBoundaries.component";
import { fontFiles } from "@src/shared/view/theme/fonts";
import { theme } from "@src/shared/view/theme/theme";
import { QueryClientProvider } from "@tanstack/react-query";
import { useFonts } from "expo-font";
import React from "react";
import { Text } from "react-native";
export default function App() {
const [fontsLoaded] = useFonts(fontFiles);
if (!fontsLoaded) {
return null;
}
return (
<QueryClientProvider client={queryClient}>
<ThemeProvider theme={theme}>
<NavigationContainer fallback={<Text>Loading...</Text>}>
<QueryBoundaries>
<Navigator />
</QueryBoundaries>
</NavigationContainer>
</ThemeProvider>
</QueryClientProvider>
);
}