forked from mickael-kerjean/filestash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrouter.js
26 lines (25 loc) · 1.14 KB
/
router.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import React from 'react';
import { BrowserRouter, Route, IndexRoute, Switch } from 'react-router-dom';
import { NotFoundPage, ConnectPage, HomePage, LogoutPage, FilesPage, ViewerPage } from './pages/';
import { Bundle, URL_HOME, URL_FILES, URL_VIEWER, URL_LOGIN, URL_LOGOUT } from './helpers/';
import { ModalPrompt, ModalAlert, ModalConfirm, Notification, Audio, Video } from './components/';
export default class AppRouter extends React.Component {
render() {
return (
<div style={{height: '100%'}}>
<BrowserRouter>
<Switch>
<Route exact path="/" component={HomePage} />
<Route path="/login" component={ConnectPage} />
<Route path="/files/:path*" component={FilesPage} />
<Route path="/view/:path*" component={ViewerPage} />
<Route path="/logout" component={LogoutPage} />
<Route component={NotFoundPage} />
</Switch>
</BrowserRouter>
<ModalPrompt /> <ModalAlert /> <ModalConfirm />
<Notification />
</div>
);
}
}