Total Complexity | 0 |
Complexity/F | 0 |
Lines of Code | 30 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Coverage | 75% |
Changes | 0 |
1 | import React, { useEffect } from 'react'; |
||
2 | import { Route, Switch } from 'react-router-dom'; |
||
3 | import NotFound from './common/NotFound'; |
||
4 | import './App.scss'; |
||
5 | |||
6 | 2 | const App = (MainHeader, Home, MenuLayout, CreateServer, EditServer, Settings) => ({ loadRealTimeUpdates }) => { |
|
7 | 2 | useEffect(() => { |
|
8 | loadRealTimeUpdates(); |
||
9 | }, []); |
||
10 | |||
11 | 2 | return ( |
|
12 | <div className="container-fluid app-container"> |
||
13 | <MainHeader /> |
||
14 | |||
15 | <div className="app"> |
||
16 | <Switch> |
||
17 | <Route exact path="/" component={Home} /> |
||
18 | <Route exact path="/settings" component={Settings} /> |
||
19 | <Route exact path="/server/create" component={CreateServer} /> |
||
20 | <Route exact path="/server/:serverId/edit" component={EditServer} /> |
||
21 | <Route path="/server/:serverId" component={MenuLayout} /> |
||
22 | <Route component={NotFound} /> |
||
23 | </Switch> |
||
24 | </div> |
||
25 | </div> |
||
26 | ); |
||
27 | }; |
||
28 | |||
29 | export default App; |
||
30 |