aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/AppRouter.js
blob: 0384555abe46fff05fa0c3c87f75736247c13fed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import React from 'react';

import {
  Route,
  Switch,
  Redirect,
} from 'react-router-dom';

import Index from './components/page/Index';
import User from './components/page/User';

class AppRouter extends React.Component {
  render() {
    return (
      <Switch>
        <Route exact path="/" component={Index} />
        <Route path="/:type/:value" component={User} />
        <Redirect to="/" />
      </Switch>
    );
  }
}

export default AppRouter;