1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-03-14 22:08:39 +01:00
ipfs-boards/src/components/App.js

22 lines
651 B
JavaScript
Raw Normal View History

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-03 16:11:18 +01:00
import BoardEditor from '../containers/BoardEditor'
2018-02-07 18:50:32 +01:00
import WithBoard from '../containers/WithBoard'
import BoardPage from '../components/BoardPage'
2018-02-03 15:07:38 +01:00
import 'semantic-ui-css/semantic.css'
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-03 16:11:18 +01:00
<Route path='/b/new' component={BoardEditor} />
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)