mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
21 lines
608 B
TypeScript
21 lines
608 B
TypeScript
import FlightPlan from "../flightplan";
|
|
import { LayerGroup } from "react-leaflet";
|
|
import { selectFlights } from "../../api/flightsSlice";
|
|
import { useAppSelector } from "../../app/hooks";
|
|
|
|
interface FlightPlansLayerProps {
|
|
blue: boolean;
|
|
}
|
|
|
|
export default function FlightPlansLayer(props: FlightPlansLayerProps) {
|
|
const atos = useAppSelector(selectFlights);
|
|
const flights = props.blue ? atos.blue : atos.red;
|
|
return (
|
|
<LayerGroup>
|
|
{Object.values(flights).map((flight) => {
|
|
return <FlightPlan key={flight.id} flight={flight} selected={false} />;
|
|
})}
|
|
</LayerGroup>
|
|
);
|
|
}
|