forked from ayoubbahmad/react-native-grocery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
34 lines (28 loc) · 858 Bytes
/
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
import React, { useState, useEffect } from "react";
import * as Font from "expo-font";
import { Provider } from "react-redux";
import configureStore from "./src/store";
import { MainContainer } from "./src/containers";
import { StatusBar, Text } from "react-native";
const store = configureStore();
const customFonts = {
"Montserrat-Regular": require("./assets/fonts/Montserrat-Regular.ttf"),
"Montserrat-SemiBold": require("./assets/fonts/Montserrat-SemiBold.ttf"),
};
export default function App() {
const [loaded, setLoaded] = useState(false);
useEffect(() => {
(async () => {
await Font.loadAsync(customFonts);
setLoaded(true);
})();
}, []);
return loaded ? (
<Provider store={store}>
<StatusBar style="auto" />
<MainContainer></MainContainer>
</Provider>
) : (
<Text>Loading</Text>
);
}