diff --git a/client/src/components/flightplanslayer/FlightPlansLayer.test.tsx b/client/src/components/flightplanslayer/FlightPlansLayer.test.tsx index 820957d0..88241dbc 100644 --- a/client/src/components/flightplanslayer/FlightPlansLayer.test.tsx +++ b/client/src/components/flightplanslayer/FlightPlansLayer.test.tsx @@ -182,7 +182,7 @@ describe("FlightPlansLayer", () => { expect(mockLayerGroup).toBeCalledTimes(1); }); it("are not drawn when only selected flights are to be drawn", () => { - renderWithProviders(, { + renderWithProviders(, { preloadedState: { flights: { flights: { @@ -355,7 +355,7 @@ describe("FlightPlansLayer", () => { expect(mockLayerGroup).toBeCalledTimes(1); }); it("are not drawn if red", () => { - renderWithProviders(, { + renderWithProviders(, { preloadedState: { flights: { flights: { @@ -397,7 +397,7 @@ describe("FlightPlansLayer", () => { }, }, }); - expect(mockPolyline).not.toHaveBeenCalled(); + expect(mockPolyline).toHaveBeenCalled(); expect(mockLayerGroup).toBeCalledTimes(1); }); }); diff --git a/client/src/components/flightplanslayer/FlightPlansLayer.tsx b/client/src/components/flightplanslayer/FlightPlansLayer.tsx index 7f8ede20..392049c1 100644 --- a/client/src/components/flightplanslayer/FlightPlansLayer.tsx +++ b/client/src/components/flightplanslayer/FlightPlansLayer.tsx @@ -5,7 +5,7 @@ import FlightPlan from "../flightplan"; import { LayerGroup } from "react-leaflet"; interface FlightPlansLayerProps { - blue: boolean; + blue?: boolean; selectedOnly?: true; } @@ -15,11 +15,6 @@ function SelectedFlightPlan(props: FlightPlansLayerProps) { return <>; } - if (!props.blue) { - // We don't currently support playing as red, so nothing to draw. - return <>; - } - return ( - - + +