2018-02-03 12:09:58 +01:00
|
|
|
import React, { Component } from 'react';
|
2018-02-04 19:08:21 +01:00
|
|
|
import { Switch, Route, withRouter } from 'react-router-dom'
|
2018-02-03 15:26:49 +01:00
|
|
|
import Boards from '../containers/Boards'
|
2018-02-09 00:08:52 +01:00
|
|
|
import OpenBoard from '../containers/OpenBoard'
|
2018-02-07 18:50:32 +01:00
|
|
|
import WithBoard from '../containers/WithBoard'
|
|
|
|
import BoardPage from '../components/BoardPage'
|
2018-02-03 12:09:58 +01:00
|
|
|
|
|
|
|
class App extends Component {
|
|
|
|
render() {
|
|
|
|
return (
|
2018-02-03 12:57:04 +01:00
|
|
|
<Switch>
|
2018-02-09 00:08:52 +01:00
|
|
|
<Route path='/b/new' component={OpenBoard} />
|
2018-02-07 18:50:32 +01:00
|
|
|
<Route path='/b/:hash/:name/' component={withRouter(WithBoard(BoardPage))} />
|
2018-02-03 15:26:49 +01:00
|
|
|
<Route path='/' component={Boards} />
|
2018-02-03 12:57:04 +01:00
|
|
|
</Switch>
|
2018-02-04 19:08:21 +01:00
|
|
|
)
|
2018-02-03 12:09:58 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-03 15:07:38 +01:00
|
|
|
export default withRouter(App)
|