-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathApp.js
58 lines (52 loc) · 1.5 KB
/
App.js
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
52
53
54
55
56
57
58
import { NavigationContainer } from "@react-navigation/native";
import { useFonts } from "expo-font";
import { extendTheme, NativeBaseProvider } from "native-base";
import React from "react";
import { LogBox } from "react-native";
import { QueryClient, QueryClientProvider } from "react-query";
import Container from "./Container";
import { UserContextProvider } from "./context/userContext";
// buat ngilangin segala notifikasi, jangan lupa comment kalau mau development lagi (mungkin di android)
LogBox.ignoreAllLogs();
export default function App() {
const [fontsLoaded] = useFonts({
AvenirLTStdBlack: require("./assets/fonts/AvenirLTStd-Black.otf"),
AvenirLTStdBook: require("./assets/fonts/AvenirLTStd-Book.otf"),
});
const config = {
useSystemColorMode: false,
initialColorMode: "light",
};
const fontConfig = {
AvenirLTStd: {
400: {
normal: "AvenirLTStdBook",
bold: "AvenirLTStdBlack",
},
},
};
const theme = extendTheme({
config,
fontConfig,
fonts: {
heading: "AvenirLTStdBlack",
body: "AvenirLTStdBook",
mono: "AvenirLTStdBook",
},
});
if (!fontsLoaded) {
return <></>;
}
const client = new QueryClient();
return (
<NavigationContainer>
<QueryClientProvider client={client}>
<NativeBaseProvider theme={theme}>
<UserContextProvider>
<Container />
</UserContextProvider>
</NativeBaseProvider>
</QueryClientProvider>
</NavigationContainer>
);
}