aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/App.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/react/App.js')
-rw-r--r--src/client/react/App.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/client/react/App.js b/src/client/react/App.js
new file mode 100644
index 0000000..e9ff565
--- /dev/null
+++ b/src/client/react/App.js
@@ -0,0 +1,36 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+
+import {
+ BrowserRouter,
+ Route,
+ Switch,
+ Redirect,
+} from 'react-router-dom';
+
+import { Provider } from 'react-redux';
+
+import Index from './components/page/Index';
+import User from './components/page/User';
+
+export default class App extends React.Component {
+ static propTypes = {
+ store: PropTypes.object.isRequired,
+ }
+
+ render() {
+ const { store } = this.props;
+
+ return (
+ <Provider store={store}>
+ <BrowserRouter>
+ <Switch>
+ <Route exact path="/" component={Index} />
+ <Route path="/:type/:value" component={User} />
+ <Redirect to="/" />
+ </Switch>
+ </BrowserRouter>
+ </Provider>
+ );
+ }
+}