Skip to content

Commit c52ae81

Browse files
author
Dan Kelley
committed
Merge branch 'master' into nginx_setup
2 parents 627132a + ad5f82a commit c52ae81

23 files changed

+665
-682
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ start_env.sh
1818

1919
/src/server/venv/
2020
/src/local_files/
21+
/src/server/secrets.py

src/client/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020

2121
npm-debug.log*
2222
yarn-debug.log*
23-
yarn-error.log*
23+
yarn-error.log*

src/client/package-lock.json

Lines changed: 6 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/client/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"@testing-library/jest-dom": "^4.2.4",
1010
"@testing-library/react": "^9.5.0",
1111
"@testing-library/user-event": "^7.2.1",
12+
"lodash": "^4.17.20",
1213
"moment": "^2.29.1",
1314
"react": "^16.13.1",
1415
"react-dom": "^16.13.1",

src/client/src/App.js

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React from "react";
2-
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
1+
import React from "react";
2+
import {BrowserRouter as Router, Switch, Route} from 'react-router-dom';
33

44
import Header from "./components/Header";
55

@@ -8,29 +8,26 @@ import Admin from './pages/Admin';
88
import DataView from './pages/DataView360/DataView360';
99
import About from './pages/About';
1010

11-
/*basic routing of the app*/
12-
export default function App(props){
13-
return (
14-
<Router>
11+
/*basic routing of the app*/
12+
export default function App(props) {
13+
return (
14+
<Router>
15+
<Header/>
1516
<Switch>
16-
<Route exact path="/">
17-
<Header />
18-
<HomePage />
19-
</Route>
20-
<Route path="/upload">
21-
<Header />
22-
<Admin />
23-
</Route>
24-
<Route path="/about">
25-
<Header />
26-
<About />
27-
</Route>
28-
<Route path="/dataView">
29-
<Header />
30-
<DataView />
31-
</Route>
17+
<Route exact path="/">
18+
<HomePage/>
19+
</Route>
20+
<Route path="/upload">
21+
<Admin/>
22+
</Route>
23+
<Route path="/about">
24+
<About/>
25+
</Route>
26+
<Route path="/dataView">
27+
<DataView/>
28+
</Route>
3229
</Switch>
33-
</Router>
34-
);
30+
</Router>
31+
);
3532
}
3633

src/client/src/pages/Admin.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,9 @@ class Admin extends Component {
175175
: _.isEmpty(this.state.statistics) !== true &&
176176
<TableContainer component={Paper} className="statisticsData">
177177
<Table aria-label="simple table" className={classes.table}>
178-
<TableHead>
179-
<TableRow>
180-
<TableCell>Sources Matched</TableCell>
181-
<TableCell align="left">Number of Matches</TableCell>
182-
</TableRow>
183-
</TableHead>
184178
<TableBody>
185-
{this.state.statistics.map((row) => (
186-
<TableRow key={row[0]}>
179+
{this.state.statistics.map((row, index) => (
180+
<TableRow key={index}>
187181
<TableCell align="left" component="th" scope="row">
188182
{row[0]}
189183
</TableCell>
@@ -195,7 +189,7 @@ class Admin extends Component {
195189
</TableContainer>
196190

197191
return (
198-
<div>
192+
<div style={{paddingLeft: 20}}>
199193
<h2>Admin Portal</h2>
200194
<Grid container spacing={3} direction="column" style={{padding:30}}>
201195
<Grid container spacing={3} direction="row">

0 commit comments

Comments
 (0)