diff --git a/client/src/components/flightplan/FlightPlan.tsx b/client/src/components/flightplan/FlightPlan.tsx index 320f4d70..2c48ed7a 100644 --- a/client/src/components/flightplan/FlightPlan.tsx +++ b/client/src/components/flightplan/FlightPlan.tsx @@ -11,10 +11,11 @@ const SELECTED_PATH = "#ffff00"; interface FlightPlanProps { flight: Flight; selected: boolean; + highlight?: boolean; } const pathColor = (props: FlightPlanProps) => { - if (props.selected) { + if (props.selected && props.highlight) { return SELECTED_PATH; } else if (props.flight.blue) { return BLUE_PATH; diff --git a/client/src/components/flightplanslayer/FlightPlansLayer.tsx b/client/src/components/flightplanslayer/FlightPlansLayer.tsx index 3b152e2d..7f8ede20 100644 --- a/client/src/components/flightplanslayer/FlightPlansLayer.tsx +++ b/client/src/components/flightplanslayer/FlightPlansLayer.tsx @@ -6,6 +6,7 @@ import { LayerGroup } from "react-leaflet"; interface FlightPlansLayerProps { blue: boolean; + selectedOnly?: true; } function SelectedFlightPlan(props: FlightPlansLayerProps) { @@ -19,10 +20,17 @@ function SelectedFlightPlan(props: FlightPlansLayerProps) { return <>; } - return ; + return ( + + ); } -export default function FlightPlansLayer(props: FlightPlansLayerProps) { +function UnselectedFlightPlans(props: FlightPlansLayerProps) { const flightData = useAppSelector(selectFlights); const isNotSelected = (flight: Flight) => { if (flightData.selected == null) { @@ -31,8 +39,12 @@ export default function FlightPlansLayer(props: FlightPlansLayerProps) { return flightData.selected !== flight.id; }; + if (props.selectedOnly) { + return <>; + } + return ( - + <> {Object.values(flightData.flights) .filter(isNotSelected) .filter((flight) => props.blue === flight.blue) @@ -41,6 +53,14 @@ export default function FlightPlansLayer(props: FlightPlansLayerProps) { ); })} + + ); +} + +export default function FlightPlansLayer(props: FlightPlansLayerProps) { + return ( + + ); diff --git a/client/src/components/liberationmap/LiberationMap.tsx b/client/src/components/liberationmap/LiberationMap.tsx index a25f2a36..0c9680f3 100644 --- a/client/src/components/liberationmap/LiberationMap.tsx +++ b/client/src/components/liberationmap/LiberationMap.tsx @@ -80,6 +80,9 @@ export default function LiberationMap() { + + +