Skip to content

Commit e6d4456

Browse files
committed
Remove unnecessary containers
1 parent a9e80c1 commit e6d4456

File tree

2 files changed

+56
-62
lines changed

2 files changed

+56
-62
lines changed

src/client/src/pages/Admin/Components/UploadBox.jsx

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,28 @@ export default function UploadBox(props) {
1414

1515
return (
1616
<Grid container item direction="column" spacing={3} sm={6}>
17-
<Grid item>
18-
<Paper>
19-
<CardContent>
20-
<Typography variant="h5">Upload Files</Typography>
21-
<Typography variant="caption">Note: This upload feature now only accepts Volgistics data files. Other data is uploaded automatically.</Typography>
22-
<form onSubmit={handleUpload}>
23-
<input type="file" id="fileItemsID"
24-
value={filesInput}
25-
multiple
26-
/>
27-
<Button
28-
type="submit"
29-
variant="contained"
30-
color="primary"
31-
>
32-
Upload
33-
</Button>
34-
</form>
35-
</CardContent>
36-
{!_.isEmpty(lastUploads) &&
37-
<UploadsTable tableData={lastUploads} />
38-
}
39-
</Paper>
40-
</Grid>
17+
<Paper>
18+
<CardContent>
19+
<Typography variant="h5">Upload Files</Typography>
20+
<Typography variant="caption">Note: This upload feature now only accepts Volgistics data files. Other data is uploaded automatically.</Typography>
21+
<form onSubmit={handleUpload}>
22+
<input type="file" id="fileItemsID"
23+
value={filesInput}
24+
multiple
25+
/>
26+
<Button
27+
type="submit"
28+
variant="contained"
29+
color="primary"
30+
>
31+
Upload
32+
</Button>
33+
</form>
34+
</CardContent>
35+
{!_.isEmpty(lastUploads) &&
36+
<UploadsTable tableData={lastUploads} />
37+
}
38+
</Paper>
4139
</Grid>
4240
);
4341
}

src/client/src/pages/Admin/Components/UploadsTable.jsx

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -17,44 +17,40 @@ export default function UploadsTable(props) {
1717
return (
1818
<Grid item>
1919
<Divider />
20-
<Grid item>
21-
<TableContainer>
22-
<Table aria-label="simple table">
23-
<TableBody>
24-
<TableRow key="upload-header">
25-
<TableCell
26-
align="left"
27-
component="th"
28-
scope="row"
29-
>
30-
<b>Upload Type</b>
31-
</TableCell>
32-
<TableCell>
33-
<b>Last Execution</b>
34-
</TableCell>
35-
</TableRow>
36-
{_.map(tableData, (row, index) => (
37-
<TableRow key={`last_run_${index}`}>
38-
<TableCell
39-
align="left"
40-
component="th"
41-
scope="row"
42-
>
43-
{formatUploadType(Object.keys(row)[0])}
44-
</TableCell>
45-
<TableCell
46-
align="left"
47-
component="th"
48-
scope="row"
49-
>
50-
{formatTimestamp(Object.values(row)[0])}
51-
</TableCell>
52-
</TableRow>
53-
))}
54-
</TableBody>
55-
</Table>
56-
</TableContainer>
57-
</Grid>
20+
<Table aria-label="simple table">
21+
<TableBody>
22+
<TableRow key="upload-header">
23+
<TableCell
24+
align="left"
25+
component="th"
26+
scope="row"
27+
>
28+
<b>Upload Type</b>
29+
</TableCell>
30+
<TableCell>
31+
<b>Last Execution</b>
32+
</TableCell>
33+
</TableRow>
34+
{_.map(tableData, (row, index) => (
35+
<TableRow key={`last_run_${index}`}>
36+
<TableCell
37+
align="left"
38+
component="th"
39+
scope="row"
40+
>
41+
{formatUploadType(Object.keys(row)[0])}
42+
</TableCell>
43+
<TableCell
44+
align="left"
45+
component="th"
46+
scope="row"
47+
>
48+
{formatTimestamp(Object.values(row)[0])}
49+
</TableCell>
50+
</TableRow>
51+
))}
52+
</TableBody>
53+
</Table>
5854
</Grid>
5955
);
6056
}

0 commit comments

Comments
 (0)