-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
35 lines (32 loc) · 959 Bytes
/
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
import { useFonts } from "expo-font";
import UserContextProvider from "./src/context/UserContext";
import { Routes } from "./src/routes/routes";
import { AppRegistry } from "react-native";
import { ToastProvider } from "react-native-toast-notifications";
AppRegistry.registerComponent("YourAppName", () => App);
export default function App() {
let [fontsLoaded] = useFonts({
"Lato-Bold": require("./assets/fonts/Lato-Bold.ttf"),
"Lato-Regular": require("./assets/fonts/Lato-Regular.ttf"),
});
if (!fontsLoaded) {
return;
} else {
return (
<UserContextProvider>
<ToastProvider
placement="bottom"
duration={5000}
animationType="slide-in"
animationDuration={250}
successColor="green"
dangerColor="red"
warningColor="orange"
normalColor="gray"
>
<Routes />
</ToastProvider>
</UserContextProvider>
);
}
}