Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,233 changes: 1,233 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

16 changes: 14 additions & 2 deletions demo/DemoApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,21 @@
*
* Not shipped to npm — the published package contains only `dist/`.
*/
import { useEffect } from "react";
import { useEffect, useState } from "react";
import { Box, Button, Stack } from "@mui/material";
import {
TelemetryProvider,
TelemetryThemeProvider,
TelemetryDashboard,
RadiusVisualizerPanel,
ShipRudderVisualizerPanel,
TacticalMapPanel,
} from "../src";
import { useAppDispatch, startSimulation, regenerateMockTelemetry } from "../src/store";

function DemoInner() {
const dispatch = useAppDispatch();
const [isTacticalMapOpen, setIsTacticalMapOpen] = useState(false);

// Boot straight into simulation mode — the demo has no basestation.
useEffect(() => {
Expand All @@ -45,7 +47,7 @@ function DemoInner() {
alignItems: "flex-end",
}}
>
<RadiusVisualizerPanel />
<RadiusVisualizerPanel onClick={() => setIsTacticalMapOpen(true)} />
<ShipRudderVisualizerPanel />
<Stack direction="row" spacing={1}>
<Button
Expand All @@ -64,8 +66,18 @@ function DemoInner() {
>
Regenerate
</Button>
<Button
data-testid="open-tactical-map"
size="small"
variant="outlined"
onClick={() => setIsTacticalMapOpen(true)}
>
Open Tactical Map
</Button>
</Stack>
</Stack>

<TacticalMapPanel open={isTacticalMapOpen} onClose={() => setIsTacticalMapOpen(false)} />
</Box>
);
}
Expand Down
Loading
Loading