-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
49 lines (41 loc) · 1.21 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
import {
configureFonts,
MD3LightTheme as DefaultTheme,
Provider as PaperProvider,
} from "react-native-paper";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import AppNavigation from "./src/navigations";
import { THEME_COLOR } from "./src/data/colors";
import { useFonts } from "expo-font";
const queryClient = new QueryClient();
export default function App() {
const [loaded] = useFonts({
Pacifico: require("./assets/fonts/Pacifico.ttf"),
"Poppins-Bold": require("./assets/fonts/Poppins-Bold.ttf"),
"Poppins-Regular": require("./assets/fonts/Poppins-Regular.ttf"),
SometypeMono: require("./assets/fonts/SometypeMono.ttf"),
});
const baseFont = {
fontFamily: "Poppins-Regular",
} as const;
const baseVariants = configureFonts({ config: baseFont });
const theme = {
...DefaultTheme,
fonts: configureFonts({ config: { ...baseVariants } }),
colors: {
...DefaultTheme.colors,
primary: THEME_COLOR,
accent: "yellow",
},
};
if (!loaded) {
return null;
}
return (
<PaperProvider theme={theme}>
<QueryClientProvider client={queryClient}>
<AppNavigation />
</QueryClientProvider>
</PaperProvider>
);
}