Test Failed
Push — master ( a53bea...3927ec )
by Stefan
02:46
created

src/App.js   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 47
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 42
mnd 0
bc 0
fnc 1
dl 0
loc 47
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A App.js ➔ App 0 29 1
1
import React from 'react';
2
import {
3
    BrowserRouter as Router,
4
    Switch,
5
    Route,
6
    Link
7
} from "react-router-dom";
8
9
import Me from './Me.js';
10
import Reports from './Reports.js';
11
import Login from './Login.js';
12
import Register from './Register.js';
13
14
15
import './App.css';
16
17
export default function App() {
18
    return (
19
        <Router>
20
            <div className="App">
21
                <nav>
22
                    <ul>
23
                        <li>
24
                            <Link to="/">Me</Link>
25
                        </li>
26
                        <li>
27
                            <Link to="/reports/">Reports</Link>
28
                        </li>
29
                        <li>
30
                            <Link to="/login/">Login</Link>
31
                        </li>
32
                    </ul>
33
                </nav>
34
35
                {/* A <Switch> looks through its children <Route>s and
36
            renders the first one that matches the current URL. */}
37
                <Switch>
38
                    <Route exact path="/" component={Me}/>
39
                    <Route path="/reports/" component={Reports}/>
40
                    <Route path="/login/" component={Login}/>
41
                    <Route path="/register/" component={Register}/>
42
                </Switch>
43
            </div>
44
        </Router>
45
    );
46
}
47