Responsive fixes
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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
9
src/containers/index.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import App from './App'
|
||||
import Home from './Home'
|
||||
import NotFound from './NotFound'
|
||||
|
||||
export {
|
||||
App,
|
||||
Home,
|
||||
NotFound
|
||||
}
|
||||
Reference in New Issue
Block a user