This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @import "./_colors.scss"; | |
| @import "./sizes.scss"; | |
| @import "./_mixin.scss"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $max-page-width: 1000px; | |
| $small-font-size: 10px; | |
| $dark-blue: #021691; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // imports | |
| import data from "MOCK_DATA.json"; | |
| // actions | |
| const SET_PRODUCTS = "SET_PRODUCTS"; | |
| // action creators |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { combineReducers, createStore, applyMiddleware } from "redux"; | |
| import thunk from "redux-thunk"; | |
| import { routerReducer, routerMiddleware } from "react-router-redux"; | |
| import products from "redux/modules/products"; | |
| import createHistory from "history/createBrowserHistory"; | |
| import { composeWithDevTools } from "redux-devtools-extension"; | |
| const env = process.env.NODE_ENV; | |
| const history = createHistory() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import ReactDOM from "react-dom"; | |
| import App from "components/App"; | |
| import { Provider } from "react-redux"; | |
| import { ConnectedRouter } from 'react-router-redux'; | |
| import store, { history } from 'redux/configureStore'; | |
| ReactDOM.render( | |
| <Provider store={store}> | |
| <ConnectedRouter history={history}> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from "react"; | |
| import { Route, Switch } from "react-router-dom"; | |
| import Nav from "components/Nav/Nav"; | |
| import Cart from "components/Cart/Cart"; | |
| import Main from "components/Main/Main"; | |
| import Item from "components/Item/Item"; | |
| class App extends Component { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from "react"; | |
| import data from "MOCK_DATA.json"; | |
| import App from "./presenter"; | |
| class Container extends Component { | |
| constructor() { | |
| super(); | |
| this.state = { | |
| products: [], | |
| cart: [], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { connect } from "react-redux"; | |
| import { actionCreators as procutsActions } from "redux/modules/products"; | |
| import Container from "./container"; | |
| const mapStateToProps = (state, ownProps) => { | |
| const { products: { items } } = state; | |
| return { | |
| items | |
| }; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { connect } from "react-redux"; | |
| import { actionCreators as procutsActions } from "redux/modules/products"; | |
| import Container from "./container"; | |
| const mapStateToProps = (state, ownProps) => { | |
| const { products: { items } } = state; | |
| const { routing: { location } } = state; | |
| return { | |
| location: location.pathname, | |
| items |