aboutsummaryrefslogtreecommitdiff
path: root/modern/src/App.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/App.js')
-rw-r--r--modern/src/App.js68
1 files changed, 34 insertions, 34 deletions
diff --git a/modern/src/App.js b/modern/src/App.js
index b76995e..ac7cdb2 100644
--- a/modern/src/App.js
+++ b/modern/src/App.js
@@ -1,7 +1,9 @@
import React from 'react';
import { ThemeProvider } from '@material-ui/core/styles';
-import { Switch, Route } from 'react-router-dom'
+import { Switch, Route } from 'react-router-dom';
import CssBaseline from '@material-ui/core/CssBaseline';
+import { useSelector } from 'react-redux';
+import { LinearProgress } from '@material-ui/core';
import MainPage from './MainPage';
import RouteReportPage from './reports/RouteReportPage';
import ServerPage from './admin/ServerPage';
@@ -16,8 +18,6 @@ import GroupPage from './settings/GroupPage';
import PositionPage from './PositionPage';
import EventReportPage from './reports/EventReportPage';
import ReplayPage from './reports/ReplayPage';
-import { useSelector } from 'react-redux';
-import { LinearProgress } from '@material-ui/core';
import TripReportPage from './reports/TripReportPage';
import StopReportPage from './reports/StopReportPage';
import SummaryReportPage from './reports/SummaryReportPage';
@@ -40,7 +40,7 @@ import GeofencesPage from './GeofencesPage';
import GeofencePage from './GeofencePage';
const App = () => {
- const initialized = useSelector(state => !!state.session.server && !!state.session.user);
+ const initialized = useSelector((state) => !!state.session.server && !!state.session.user);
return (
<ThemeProvider theme={theme}>
@@ -48,44 +48,44 @@ const App = () => {
<SocketController />
<CachingController />
<Switch>
- <Route exact path='/login' component={LoginForm} />
- <Route exact path='/register' component={RegisterForm} />
- <Route exact path='/reset-password' component={ResetPasswordForm} />
+ <Route exact path="/login" component={LoginForm} />
+ <Route exact path="/register" component={RegisterForm} />
+ <Route exact path="/reset-password" component={ResetPasswordForm} />
<Route>
{!initialized ? (<LinearProgress />) : (
<Switch>
- <Route exact path='/' component={MainPage} />
- <Route exact path='/replay' component={ReplayPage} />
- <Route exact path='/position/:id?' component={PositionPage} />
- <Route exact path='/user/:id?' component={UserPage} />
- <Route exact path='/device/:id?' component={DevicePage} />
- <Route exact path='/geofence/:id?' component={GeofencePage} />
- <Route exact path='/geofences' component={GeofencesPage} />
- <Route exact path='/settings/notifications' component={NotificationsPage} />
- <Route exact path='/settings/notification/:id?' component={NotificationPage} />
- <Route exact path='/settings/groups' component={GroupsPage} />
- <Route exact path='/settings/group/:id?' component={GroupPage} />
- <Route exact path='/settings/drivers' component={DriversPage} />
- <Route exact path='/settings/driver/:id?' component={DriverPage} />
- <Route exact path='/settings/attributes' component={ComputedAttributesPage} />
- <Route exact path='/settings/attribute/:id?' component={ComputedAttributePage} />
- <Route exact path='/settings/maintenances' component={MaintenancesPage} />
- <Route exact path='/settings/maintenance/:id?' component={MaintenancePage} />
- <Route exact path='/admin/server' component={ServerPage} />
- <Route exact path='/admin/users' component={UsersPage} />
- <Route exact path='/admin/statistics' component={StatisticsPage} />
- <Route exact path='/reports/route' component={RouteReportPage} />
- <Route exact path='/reports/event' component={EventReportPage} />
- <Route exact path='/reports/trip' component={TripReportPage} />
- <Route exact path='/reports/stop' component={StopReportPage} />
- <Route exact path='/reports/summary' component={SummaryReportPage} />
- <Route exact path='/reports/chart' component={ChartReportPage} />
+ <Route exact path="/" component={MainPage} />
+ <Route exact path="/replay" component={ReplayPage} />
+ <Route exact path="/position/:id?" component={PositionPage} />
+ <Route exact path="/user/:id?" component={UserPage} />
+ <Route exact path="/device/:id?" component={DevicePage} />
+ <Route exact path="/geofence/:id?" component={GeofencePage} />
+ <Route exact path="/geofences" component={GeofencesPage} />
+ <Route exact path="/settings/notifications" component={NotificationsPage} />
+ <Route exact path="/settings/notification/:id?" component={NotificationPage} />
+ <Route exact path="/settings/groups" component={GroupsPage} />
+ <Route exact path="/settings/group/:id?" component={GroupPage} />
+ <Route exact path="/settings/drivers" component={DriversPage} />
+ <Route exact path="/settings/driver/:id?" component={DriverPage} />
+ <Route exact path="/settings/attributes" component={ComputedAttributesPage} />
+ <Route exact path="/settings/attribute/:id?" component={ComputedAttributePage} />
+ <Route exact path="/settings/maintenances" component={MaintenancesPage} />
+ <Route exact path="/settings/maintenance/:id?" component={MaintenancePage} />
+ <Route exact path="/admin/server" component={ServerPage} />
+ <Route exact path="/admin/users" component={UsersPage} />
+ <Route exact path="/admin/statistics" component={StatisticsPage} />
+ <Route exact path="/reports/route" component={RouteReportPage} />
+ <Route exact path="/reports/event" component={EventReportPage} />
+ <Route exact path="/reports/trip" component={TripReportPage} />
+ <Route exact path="/reports/stop" component={StopReportPage} />
+ <Route exact path="/reports/summary" component={SummaryReportPage} />
+ <Route exact path="/reports/chart" component={ChartReportPage} />
</Switch>
)}
</Route>
</Switch>
</ThemeProvider>
);
-}
+};
export default App;