Skip to content

Commit 0b319b1

Browse files
committed
shop app adicionado ao repositório
1 parent 0665867 commit 0b319b1

39 files changed

+22166
-0
lines changed

shop-app/.expo-shared/assets.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true,
3+
"40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true
4+
}

shop-app/.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
node_modules/
2+
.expo/
3+
dist/
4+
npm-debug.*
5+
*.jks
6+
*.p8
7+
*.p12
8+
*.key
9+
*.mobileprovision
10+
*.orig.*
11+
web-build/
12+
13+
# macOS
14+
.DS_Store

shop-app/App.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import React, { useState } from "react";
2+
import { createStore, combineReducers, applyMiddleware } from "redux";
3+
import { Provider } from "react-redux";
4+
5+
import AppLoading from "expo-app-loading";
6+
import * as Font from "expo-font";
7+
import ReduxThunk from "redux-thunk";
8+
// import { composeWithDevTools } from "redux-devtools-extension";
9+
10+
import productsReducer from "./store/reducers/productsReducer";
11+
import cartReducer from "./store/reducers/cartReducer";
12+
import ordersReducer from "./store/reducers/ordersReducer";
13+
import ShopNavigator from "./navigation/ShopNavigator";
14+
import { SafeAreaView } from "react-native-safe-area-context";
15+
16+
const rootReducer = combineReducers({
17+
products: productsReducer,
18+
cart: cartReducer,
19+
orders: ordersReducer,
20+
});
21+
22+
const store = createStore(rootReducer, applyMiddleware(ReduxThunk));
23+
// const store = createStore(rootReducer, composeWithDevTools());
24+
25+
const fetchFonts = () => {
26+
return Font.loadAsync({
27+
"open-sans": require("./assets/fonts/OpenSans-Regular.ttf"),
28+
"open-sans-bold": require("./assets/fonts/OpenSans-Bold.ttf"),
29+
});
30+
};
31+
32+
export default function App() {
33+
const [fontLoaded, setFontLoaded] = useState(false);
34+
35+
if (!fontLoaded) {
36+
return (
37+
<AppLoading
38+
startAsync={fetchFonts}
39+
onFinish={() => setFontLoaded(true)}
40+
onError={(err) => console.log(err)}
41+
/>
42+
);
43+
}
44+
return (
45+
<Provider store={store}>
46+
<SafeAreaView style={{ flex: 1 }}>
47+
<ShopNavigator />
48+
</SafeAreaView>
49+
</Provider>
50+
);
51+
}

shop-app/app.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"expo": {
3+
"name": "shop-app",
4+
"slug": "shop-app",
5+
"version": "1.0.0",
6+
"orientation": "portrait",
7+
"icon": "./assets/icon.png",
8+
"splash": {
9+
"image": "./assets/splash.png",
10+
"resizeMode": "contain",
11+
"backgroundColor": "#ffffff"
12+
},
13+
"updates": {
14+
"fallbackToCacheTimeout": 0
15+
},
16+
"assetBundlePatterns": [
17+
"**/*"
18+
],
19+
"ios": {
20+
"supportsTablet": true
21+
},
22+
"android": {
23+
"adaptiveIcon": {
24+
"foregroundImage": "./assets/adaptive-icon.png",
25+
"backgroundColor": "#FFFFFF"
26+
}
27+
},
28+
"web": {
29+
"favicon": "./assets/favicon.png"
30+
}
31+
}
32+
}

shop-app/assets/adaptive-icon.png

17.1 KB
Loading

shop-app/assets/favicon.png

1.43 KB
Loading
101 KB
Binary file not shown.
94.2 KB
Binary file not shown.

shop-app/assets/icon.png

21.9 KB
Loading

shop-app/assets/splash.png

46.2 KB
Loading

0 commit comments

Comments
 (0)