26 lines
716 B
JavaScript
26 lines
716 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import { Provider } from 'react-redux';
|
|
import { BrowserRouter, Route, Switch } from 'react-router-dom';
|
|
|
|
import PublishPage from 'components/PublishPage';
|
|
import AboutPage from 'components/AboutPage';
|
|
import LoginPage from 'components/LoginPage';
|
|
|
|
const Root = ({ store }) => (
|
|
<Provider store={store}>
|
|
<BrowserRouter>
|
|
<Switch>
|
|
<Route exact path="/" component={PublishPage} />
|
|
<Route exact path="/about" component={AboutPage} />
|
|
<Route exact path="/login" component={LoginPage} />
|
|
</Switch>
|
|
</BrowserRouter>
|
|
</Provider>
|
|
)
|
|
|
|
Root.propTypes = {
|
|
store: PropTypes.object.isRequired,
|
|
}
|
|
|
|
export default Root;
|