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

21 lines
602 B
JavaScript
Raw Normal View History

2018-02-03 12:09:58 +01:00
import React, { Component } from 'react';
2019-03-10 19:53:18 +01:00
import { Switch, Route, withRouter } from 'react-router-dom';
import Boards from '../containers/Boards';
import OpenBoard from '../containers/OpenBoard';
import WithBoard from '../containers/WithBoard';
import BoardPage from './BoardPage';
2018-02-03 12:09:58 +01:00
class App extends Component {
render() {
return (
2018-02-03 12:57:04 +01:00
<Switch>
2019-03-10 19:53:18 +01:00
<Route path="/b/new" component={OpenBoard} />
<Route path="/b/:hash/:name/" component={withRouter(WithBoard(BoardPage))} />
<Route path="/" component={Boards} />
2018-02-03 12:57:04 +01:00
</Switch>
2019-03-10 19:53:18 +01:00
);
2018-02-03 12:09:58 +01:00
}
}
2019-03-10 19:53:18 +01:00
export default withRouter(App);