* CEC-3898 Update ecu table * smells * smells * smells * smells * Fix test * Clean up Car status tests
36 lines
1.0 KiB
JavaScript
36 lines
1.0 KiB
JavaScript
import { Typography } from "@material-ui/core";
|
|
import clsx from "clsx";
|
|
import React from "react";
|
|
|
|
import { useUserContext } from "../../Contexts/UserContext";
|
|
import { VehicleProvider } from "../../Contexts/VehicleContext";
|
|
import CarUpdatesTable from "../../Controls/CarUpdatesTable";
|
|
import CarVersionLogTable from "../../Controls/CarVersionLogTable";
|
|
import useStyles from "../../useStyles";
|
|
|
|
const MainForm = ({vin}) => {
|
|
const classes = useStyles();
|
|
const {
|
|
token: {
|
|
idToken: { jwtToken: token },
|
|
},
|
|
} = useUserContext();
|
|
|
|
return (
|
|
<div className={clsx(classes.paper, classes.tableSize)}>
|
|
<Typography variant="h6">Car Updates</Typography>
|
|
<CarUpdatesTable vin={vin} token={token} classes={classes} />
|
|
<Typography variant="h6" className={classes.labelInline}>Version Log</Typography>
|
|
<CarVersionLogTable vin={vin} token={token} classes={classes} />
|
|
</div>
|
|
);
|
|
};
|
|
|
|
const CarUpdatesTab = ({vin}) => (
|
|
<VehicleProvider>
|
|
<MainForm vin={vin} />
|
|
</VehicleProvider>
|
|
);
|
|
|
|
export default CarUpdatesTab;
|