fixing warnings and updating snapshots

This commit is contained in:
Drew Taylor
2021-07-22 10:30:38 -07:00
parent 856364370f
commit eb22be3763
7 changed files with 343 additions and 340 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
import React, { useEffect, useState } from "react"; import React, { useEffect } from "react";
import { Typography } from "@material-ui/core"; import { Typography } from "@material-ui/core";
import useStyles from "../useStyles"; import useStyles from "../useStyles";

View File

@@ -46,10 +46,10 @@ exports[`File Upload Form Should render 1`] = `
/> />
<fieldset <fieldset
aria-hidden="true" aria-hidden="true"
class="PrivateNotchedOutline-root-37 MuiOutlinedInput-notchedOutline" class="PrivateNotchedOutline-root-38 MuiOutlinedInput-notchedOutline"
> >
<legend <legend
class="PrivateNotchedOutline-legendLabelled-39" class="PrivateNotchedOutline-legendLabelled-40"
> >
<span> <span>
Package name Package name
@@ -92,10 +92,10 @@ exports[`File Upload Form Should render 1`] = `
/> />
<fieldset <fieldset
aria-hidden="true" aria-hidden="true"
class="PrivateNotchedOutline-root-37 MuiOutlinedInput-notchedOutline" class="PrivateNotchedOutline-root-38 MuiOutlinedInput-notchedOutline"
> >
<legend <legend
class="PrivateNotchedOutline-legendLabelled-39" class="PrivateNotchedOutline-legendLabelled-40"
> >
<span> <span>
Version Version
@@ -138,10 +138,10 @@ exports[`File Upload Form Should render 1`] = `
/> />
<fieldset <fieldset
aria-hidden="true" aria-hidden="true"
class="PrivateNotchedOutline-root-37 MuiOutlinedInput-notchedOutline" class="PrivateNotchedOutline-root-38 MuiOutlinedInput-notchedOutline"
> >
<legend <legend
class="PrivateNotchedOutline-legendLabelled-39" class="PrivateNotchedOutline-legendLabelled-40"
> >
<span> <span>
Description Description
@@ -185,10 +185,10 @@ exports[`File Upload Form Should render 1`] = `
/> />
<fieldset <fieldset
aria-hidden="true" aria-hidden="true"
class="PrivateNotchedOutline-root-37 MuiOutlinedInput-notchedOutline" class="PrivateNotchedOutline-root-38 MuiOutlinedInput-notchedOutline"
> >
<legend <legend
class="PrivateNotchedOutline-legendLabelled-39" class="PrivateNotchedOutline-legendLabelled-40"
> >
<span> <span>
Release Notes URL Release Notes URL

View File

@@ -37,6 +37,7 @@ const Component = () => {
retrieveAndStoreLocations(); retrieveAndStoreLocations();
}, REQUEST_INTERVAL); }, REQUEST_INTERVAL);
return () => { clearInterval(id) }; return () => { clearInterval(id) };
// eslint-disable-next-line
}, []); }, []);
const retrieveAndStoreLocations = () => { const retrieveAndStoreLocations = () => {
@@ -76,7 +77,8 @@ const Component = () => {
setConnections(connections); setConnections(connections);
}) })
} }
}, [markers]) // eslint-disable-next-line
}, [markers, token])
const [selectedVIN, setSelectedVIN] = useState(null); const [selectedVIN, setSelectedVIN] = useState(null);
const [carState, setCarState] = useState(null); const [carState, setCarState] = useState(null);
@@ -89,6 +91,7 @@ const Component = () => {
}, REQUEST_INTERVAL); }, REQUEST_INTERVAL);
return () => { clearInterval(id) }; return () => { clearInterval(id) };
} }
// eslint-disable-next-line
}, [selectedVIN]); }, [selectedVIN]);
const selectCar = (e, vin) => { const selectCar = (e, vin) => {
@@ -166,6 +169,7 @@ const Component = () => {
{ {
carState ? ( carState ? (
<VehiclePopUp <VehiclePopUp
key={carState.vin}
vin={carState.vin} vin={carState.vin}
online={carState.online} online={carState.online}
battery={carState.battery} battery={carState.battery}
@@ -183,13 +187,15 @@ const Component = () => {
const CenterFocus = ({ center, zoom }) => { const CenterFocus = ({ center, zoom }) => {
const map = useMap(); const map = useMap();
useEffect(() => { useEffect(() => {
if (center[0] === 0 && center[1] === 0) { if (center[0] === 0 && center[1] === 0) {
center = [0, 0] map.flyTo([0, 0], 2, { duration: 1.5 });
zoom = 2 } else {
}
map.flyTo(center, zoom, { duration: 1.5 }); map.flyTo(center, zoom, { duration: 1.5 });
}, [center, zoom]); }
}, [center, zoom, map]);
return null; return null;
} }

View File

@@ -1,9 +1,6 @@
import React from "react"; import React from "react";
import Button from '@material-ui/core/Button';
import Dialog from '@material-ui/core/Dialog'; import Dialog from '@material-ui/core/Dialog';
import MuiDialogTitle from '@material-ui/core/DialogTitle'; import MuiDialogTitle from '@material-ui/core/DialogTitle';
import MuiDialogContent from '@material-ui/core/DialogContent';
import MuiDialogActions from '@material-ui/core/DialogActions';
import IconButton from '@material-ui/core/IconButton'; import IconButton from '@material-ui/core/IconButton';
import CloseIcon from '@material-ui/icons/Close'; import CloseIcon from '@material-ui/icons/Close';
import Typography from '@material-ui/core/Typography'; import Typography from '@material-ui/core/Typography';
@@ -32,19 +29,19 @@ const VehiclePopUp = (props) => {
{doors != null && ( {doors != null && (
<div> <div>
<h3>Doors</h3> <h3>Doors</h3>
{Object.entries(doors).map((value) => (<p><b>{value[0]}</b>: {value[1] ? "open" : "closed"}</p>))} {Object.entries(doors).map((value) => (<p key={value[0]}><b>{value[0]}</b>: {value[1] ? "open" : "closed"}</p>))}
</div> </div>
)} )}
{windows != null && ( {windows != null && (
<div> <div>
<h3>Windows</h3> <h3>Windows</h3>
{Object.entries(windows).map((value) => (<p><b>{value[0]}</b>: {value[1] ? "open" : "closed"}</p>))} {Object.entries(windows).map((value) => (<p key={value[0]}><b>{value[0]}</b>: {value[1] ? "open" : "closed"}</p>))}
</div> </div>
)} )}
{location != null && ( {location != null && (
<div> <div>
<h3>Location</h3> <h3>Location</h3>
{Object.entries(location).map((value) => (<p><b>{value[0]}</b>: {value[1]}</p>))} {Object.entries(location).map((value) => (<p key={value[0]}><b>{value[0]}</b>: {value[1]}</p>))}
</div> </div>
)} )}
</div> </div>
@@ -61,7 +58,7 @@ const DialogTitle = (props) => {
const { children, onClose, ...other } = props; const { children, onClose, ...other } = props;
const classes = useStyles(); const classes = useStyles();
return ( return (
<MuiDialogTitle disableTypography className={classes.root} {...other}> <MuiDialogTitle disableTypography className={classes.ppopUpTItle} {...other}>
<Typography variant="h6">{children}</Typography> <Typography variant="h6">{children}</Typography>
{onClose ? ( {onClose ? (
<IconButton aria-label="close" className={classes.closeButton} onClick={onClose}> <IconButton aria-label="close" className={classes.closeButton} onClick={onClose}>

View File

@@ -173,10 +173,6 @@ const useStyles = makeStyles((theme) => ({
width: "100%", width: "100%",
paddingTop: "56.25%", paddingTop: "56.25%",
}, },
root: {
margin: 0,
padding: theme.spacing(2),
},
closeButton: { closeButton: {
position: 'absolute', position: 'absolute',
right: theme.spacing(1), right: theme.spacing(1),
@@ -189,6 +185,10 @@ const useStyles = makeStyles((theme) => ({
popUp: { popUp: {
minHeight: "15vh", minHeight: "15vh",
}, },
popUpTitle: {
margin: 0,
padding: theme.spacing(2),
},
popUpContent: { popUpContent: {
"& p": { "& p": {
margin: 0, margin: 0,

View File

@@ -6,24 +6,24 @@ const clientToken = 'pubeb25449bb91773fc993855c7378e375a';
const site = 'datadoghq.com'; const site = 'datadoghq.com';
const service = 'ota-portal'; const service = 'ota-portal';
// datadogRum.init({ datadogRum.init({
// applicationId, applicationId,
// clientToken, clientToken,
// site, site,
// service, service,
// // Specify a version number to identify the deployed version of your application in Datadog // Specify a version number to identify the deployed version of your application in Datadog
// // version: '1.0.0', // version: '1.0.0',
// sampleRate: 100, sampleRate: 100,
// trackInteractions: true trackInteractions: true
// }); });
// datadogLogs.init({ datadogLogs.init({
// clientToken, clientToken,
// site, site,
// service, service,
// forwardErrorsToLogs: true, forwardErrorsToLogs: true,
// sampleRate: 100, sampleRate: 100,
// }); });
const logger = datadogLogs.logger; const logger = datadogLogs.logger;