aboutsummaryrefslogtreecommitdiff
path: root/modern/src/App.js
blob: b25d1aba87944f2b5debb075920786413d718750 (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
25
26
27
28
29
30
31
32
33
34
35
import React from 'react';
import { Switch, Route } from 'react-router-dom'
import CssBaseline from '@material-ui/core/CssBaseline';
import MainPage from './MainPage';
import LoginPage from './LoginPage';
import RouteReportPage from './reports/RouteReportPage';
import ServerPage from './admin/ServerPage';
import UsersPage from './admin/UsersPage';
import DevicePage from './DevicePage';
import UserPage from './UserPage';
import SocketController from './SocketController';
import NotificationsPage from './settings/NotificationsPage';
import NotificationPage from './settings/NotificationPage';

const App = () => {
  return (
    <>
      <CssBaseline />
      <SocketController />
      <Switch>
        <Route exact path='/' component={MainPage} />
        <Route exact path='/login' component={LoginPage} />
        <Route exact path='/user/:id?' component={UserPage} />
        <Route exact path='/device/:id?' component={DevicePage} />
        <Route exact path='/reports/route' component={RouteReportPage} />
        <Route exact path='/settings/notifications' component={NotificationsPage} />
        <Route exact path='/settings/notification/:id?' component={NotificationPage} />
        <Route exact path='/admin/server' component={ServerPage} />
        <Route exact path='/admin/users' component={UsersPage} />
      </Switch>
    </>
  );
}

export default App;