Reorganize app pages (#73)

* Update layout and menus

* Add breadcrumbs
Add menu icons
Add ECU drop down

* Implement submenu
Update download progress

* revamped dashboard section - failing app.test.js

* Clean up

Co-authored-by: Drew Taylor <dtaylor@fiskerinc.com>
This commit is contained in:
John Wu
2021-08-10 08:11:06 -07:00
committed by GitHub
parent 0545b54daf
commit e50eb886e6
39 changed files with 4043 additions and 3623 deletions

View File

@@ -1,5 +1,7 @@
import React, { useEffect, useState } from "react";
import { Grid } from "@material-ui/core";
import AddCircleIcon from "@material-ui/icons/AddCircle";
import { Link } from "react-router-dom";
import { VehicleProvider } from "../../Contexts/VehicleContext";
import { useUserContext } from "../../Contexts/UserContext";
@@ -14,7 +16,7 @@ const MainForm = () => {
const classes = useStyles();
const [selected, setSelected] = useState([]);
const [search, setSearch] = useState("");
const { setTitle } = useStatusContext();
const { setTitle, setSitePath } = useStatusContext();
const {
token: {
idToken: { jwtToken: token },
@@ -46,7 +48,8 @@ const MainForm = () => {
};
useEffect(() => {
setTitle("Send Command");
setTitle("Vehicles");
setSitePath([]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
@@ -54,6 +57,9 @@ const MainForm = () => {
<div className={classes.paper} style={{ height: 700, width: "100%" }}>
<Grid container className={classes.root} spacing={2}>
<Grid item md={6}>
<Link to="/vehicle-add" className={classes.labelInline}>
<AddCircleIcon fontSize="large" />
</Link>
<SearchField classes={classes} onSearch={handleSearch} />
<div
className={classes.labelInline}