diff options
Diffstat (limited to 'modern/src/App.js')
-rw-r--r-- | modern/src/App.js | 28 |
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; |