aboutsummaryrefslogtreecommitdiff
path: root/modern/src/App.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-03-29 15:09:29 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-03-29 15:09:29 -0700
commit41ca114c886797c557c705ef90cc1b7491d16d4e (patch)
tree314208b2fb14cbe311120029064a117966e94b5c /modern/src/App.js
parent800da2aef77cd0e64d39b419929f7ac97db47f21 (diff)
downloadtrackermap-web-41ca114c886797c557c705ef90cc1b7491d16d4e.tar.gz
trackermap-web-41ca114c886797c557c705ef90cc1b7491d16d4e.tar.bz2
trackermap-web-41ca114c886797c557c705ef90cc1b7491d16d4e.zip
Move more components to hooks
Diffstat (limited to 'modern/src/App.js')
-rw-r--r--modern/src/App.js28
1 files changed, 13 insertions, 15 deletions
diff --git a/modern/src/App.js b/modern/src/App.js
index a7752823..cc15ca59 100644
--- a/modern/src/App.js
+++ b/modern/src/App.js
@@ -1,4 +1,4 @@
-import React, { Component, Fragment } from 'react';
+import React from 'react';
import { Switch, Route } from 'react-router-dom'
import CssBaseline from '@material-ui/core/CssBaseline';
import MainPage from './MainPage';
@@ -6,20 +6,18 @@ import LoginPage from './LoginPage';
import RouteReportPage from './RouteReportPage';
import DevicePage from './DevicePage';
-class App extends Component {
- render() {
- return (
- <Fragment>
- <CssBaseline />
- <Switch>
- <Route exact path='/' component={MainPage} />
- <Route exact path='/login' component={LoginPage} />
- <Route exact path='/device' component={DevicePage} />
- <Route exact path='/reports/route' component={RouteReportPage} />
- </Switch>
- </Fragment>
- );
- }
+const App = () => {
+ return (
+ <>
+ <CssBaseline />
+ <Switch>
+ <Route exact path='/' component={MainPage} />
+ <Route exact path='/login' component={LoginPage} />
+ <Route exact path='/device' component={DevicePage} />
+ <Route exact path='/reports/route' component={RouteReportPage} />
+ </Switch>
+ </>
+ );
}
export default App;