2018-01-29 20:47:12 +01:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { Provider } from 'react-redux';
|
2018-01-29 21:27:22 +01:00
|
|
|
import { BrowserRouter, Route, Switch } from 'react-router-dom';
|
2018-01-29 20:47:12 +01:00
|
|
|
|
|
|
|
import PublishPage from 'components/PublishPage';
|
|
|
|
import AboutPage from 'components/AboutPage';
|
|
|
|
import LoginPage from 'components/LoginPage';
|
|
|
|
|
|
|
|
const Root = ({ store }) => (
|
|
|
|
<Provider store={store}>
|
2018-01-29 21:27:22 +01:00
|
|
|
<BrowserRouter>
|
|
|
|
<Switch>
|
|
|
|
<Route exact path="/" component={PublishPage} />
|
|
|
|
<Route exact path="/about" component={AboutPage} />
|
|
|
|
<Route exact path="/login" component={LoginPage} />
|
|
|
|
</Switch>
|
|
|
|
</BrowserRouter>
|
2018-01-29 20:47:12 +01:00
|
|
|
</Provider>
|
|
|
|
)
|
|
|
|
|
|
|
|
Root.propTypes = {
|
|
|
|
store: PropTypes.object.isRequired,
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Root;
|