-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
executable file
·37 lines (31 loc) · 1.01 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
import React, { useState } from "react";
import { createStore, combineReducers, applyMiddleware } from "redux";
import { Provider } from "react-redux";
import { useFonts } from "expo-font";
import ReduxThunk from "redux-thunk";
import NavigationContainer from "./navigation/NavigationContainer";
import productReducer from "./store/reducers/products";
import cartReducer from "./store/reducers/cart";
import orderReducer from "./store/reducers/orders";
import authReducer from "./store/reducers/Auth";
const rootReducer = combineReducers({
products: productReducer,
cart: cartReducer,
orders: orderReducer,
Auth: authReducer,
});
const store = createStore(rootReducer, applyMiddleware(ReduxThunk));
export default function App() {
const [loaded] = useFonts({
openSans: require("./assets/fonts/OpenSans-Regular.ttf"),
openSansBold: require("./assets/fonts/OpenSans-Bold.ttf"),
});
if (!loaded) {
return null;
}
return (
<Provider store={store}>
<NavigationContainer />
</Provider>
);
}