diff --git a/.env.example b/.env.example deleted file mode 100644 index 06934c5..0000000 --- a/.env.example +++ /dev/null @@ -1 +0,0 @@ -REACT_APP_API_URL=http://localhost \ No newline at end of file diff --git a/package.json b/package.json index 6919717..7103be5 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,6 @@ "react-router-dom": "^4.1.1", "react-scripts": "^1.0.10", "react-select": "^1.0.0-rc.5", - "reactstrap": "^4.8.0", "redux": "^3.0.0", "redux-logger": "^3.0.6", "redux-thunk": "^2.2.0", @@ -57,7 +56,9 @@ "scripts": { "start": "node scripts/start.js", "build": "node scripts/build.js", - "test": "node scripts/test.js --env=jsdom" + "test": "node scripts/test.js --env=jsdom", + "predeploy": "npm run build", + "deploy": "gh-pages -d build" }, "devDependencies": { "babel-eslint": "^7.2.3", diff --git a/src/actions/product.js b/src/actions/product.js index 837702c..1e43a58 100644 --- a/src/actions/product.js +++ b/src/actions/product.js @@ -2,12 +2,12 @@ import * as types from '../constants/types'; export function getProducts() { return dispatch => { - fetch(`${process.env.REACT_APP_API_URL}/v1/api/products`) + fetch(`https://api.myjson.com/bins/dfnzz`) .then(response => response.json()) .then(response => { dispatch({ type: types.FETCH_PRODUCTS, - payload: response + payload: response.products }); }) } @@ -15,4 +15,4 @@ export function getProducts() { export function compare(product) { return {type: types.COMPARE_PRODUCT, product}; -} \ No newline at end of file +} diff --git a/src/components/Compare/index.js b/src/components/Compare/index.js index 4952d0d..c513f93 100644 --- a/src/components/Compare/index.js +++ b/src/components/Compare/index.js @@ -1,5 +1,4 @@ import React from 'react' -import {Table} from 'reactstrap' import './index.css' const Compare = ({products}) => @@ -8,7 +7,7 @@ const Compare = ({products}) =>
- +
@@ -45,7 +44,7 @@ const Compare = ({products}) => )} -
+
; diff --git a/src/components/Product/index.js b/src/components/Product/index.js index 6805abb..d3db019 100644 --- a/src/components/Product/index.js +++ b/src/components/Product/index.js @@ -1,18 +1,6 @@ import React from 'react' import './index.css' -// const Product = ({product, compare}) => -//
-// compare(product)} -// color={product.compare ? "success" : "primary"} -// > -// -// {product.name} -// -// -//
; - const Product = ({product, compare}) =>
diff --git a/static.json b/static.json deleted file mode 100644 index b476665..0000000 --- a/static.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "root": "build/", - "routes": { - "/**": "index.html" - } -}