diff --git a/src/components/Cars/Status/__snapshots__/DigitalTwinTab.test.jsx.snap b/src/components/Cars/Status/__snapshots__/DigitalTwinTab.test.jsx.snap index 196e03f..1f8ffc2 100644 --- a/src/components/Cars/Status/__snapshots__/DigitalTwinTab.test.jsx.snap +++ b/src/components/Cars/Status/__snapshots__/DigitalTwinTab.test.jsx.snap @@ -219,6 +219,17 @@ exports[`DigitalTwinTab Render 1`] = ` d439abd3662dd20099f49dd8f43f7b145202e961caa2b5aba2c6154c8096348b

+
+

+ + Vehicle Speed + + : + 77.7 +

+
({ getModels: jest.fn(() => { models = ["Ocean", "PEAR"]; }), - getState: jest.fn(() => vehicleState), + getState: jest.fn().mockResolvedValue(vehicleState), getYears: jest.fn(() => { years = [2023, 2024]; }), diff --git a/src/components/DigitalTwin/index.js b/src/components/DigitalTwin/index.js index c359dc7..804e9e0 100644 --- a/src/components/DigitalTwin/index.js +++ b/src/components/DigitalTwin/index.js @@ -27,7 +27,7 @@ const windowState = (value) => { const DigitalTwin = (props) => { const classes = useStyles(); - const { battery, doors, location, trex_version, ip, updated, windows, misc_windows, sunroof, dbc_version, door_locks, vcu0x260, charging_metrics, max_range } = props; + const { battery, doors, location, trex_version, ip, updated, windows, misc_windows, sunroof, dbc_version, door_locks, vcu0x260, charging_metrics, max_range, vehicle_speed } = props; return (
@@ -122,6 +122,11 @@ const DigitalTwin = (props) => { {keyValueTemplate("DBC Version", dbc_version)}
)} + {vehicle_speed && ( +
+ {keyValueTemplate("Vehicle Speed", vehicle_speed.speed)} +
+ )}
); };