Skip to content

Commit

Permalink
added react-roter example integration
Browse files Browse the repository at this point in the history
  • Loading branch information
BiosBoy committed Nov 16, 2018
1 parent a2ecf1b commit 7080a33
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/container/index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
import { PropTypes } from 'prop-types';
import React from 'react';
import { Provider } from 'react-redux';
import { Switch, Route } from 'react-router-dom';
import { ConnectedRouter } from 'connected-react-router';
import { Header, Footer, HelloWorld } from '../components';
import styles from '../styles/index.scss';

const AppContainer = ({ store, history }) => {
return (
<Provider store={store} history={history}>
<div className={styles.appWrapper}>
<Header />
<HelloWorld />
<Footer />
</div>
<ConnectedRouter history={history}>
<div className={styles.appWrapper}>
<Header />
<Switch location={location}>
<Route exact path='/' component={HelloWorld} />
</Switch>
<Footer />
</div>
</ConnectedRouter>
</Provider>
);
};
Expand Down

0 comments on commit 7080a33

Please sign in to comment.