Responsive fixes

This commit is contained in:
Ray
2017-09-17 14:41:03 +01:00
parent ffc5d9f481
commit cbe7410f8d
12 changed files with 10954 additions and 135 deletions

View File

@@ -1,8 +1,7 @@
import React, {Component} from 'react';
import {Route, Switch} from 'react-router-dom'
import Home from '../Home';
import NotFound from '../NotFound';
import {Home, NotFound} from '../';
export default class App extends Component {
render() {

View File

@@ -1,7 +1,6 @@
import React from 'react';
import {bindActionCreators} from 'redux';
import ProductList from '../../components/ProductList';
import Compare from '../../components/Compare';
import {Compare, ProductList} from '../../components';
import * as productActions from '../../actions';
import {connect} from 'react-redux';
@@ -11,14 +10,13 @@ class Home extends React.Component {
}
render() {
const {products, actions} = this.props;
const compareProducts = products.filter(product => product.compare);
return (
<div className="Home mt-5">
<ProductList products={products} compare={actions.compare}/>
<Compare products={compareProducts}/>
{compareProducts.length >= 2 ? <Compare products={compareProducts}/> : null}
</div>
);
}

9
src/containers/index.js Normal file
View File

@@ -0,0 +1,9 @@
import App from './App'
import Home from './Home'
import NotFound from './NotFound'
export {
App,
Home,
NotFound
}