mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Draw aircraft locations in the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
This commit is contained in:
18
client/src/components/aircraftlayer/AircraftLayer.tsx
Normal file
18
client/src/components/aircraftlayer/AircraftLayer.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import { selectFlights } from "../../api/flightsSlice";
|
||||
import { useAppSelector } from "../../app/hooks";
|
||||
import Aircraft from "../aircraft";
|
||||
import { LayerGroup } from "react-leaflet";
|
||||
|
||||
export default function AircraftLayer() {
|
||||
const atos = useAppSelector(selectFlights);
|
||||
return (
|
||||
<LayerGroup>
|
||||
{Object.values(atos.blue).map((flight) => {
|
||||
return <Aircraft key={flight.id} flight={flight} />;
|
||||
})}
|
||||
{Object.values(atos.red).map((flight) => {
|
||||
return <Aircraft key={flight.id} flight={flight} />;
|
||||
})}
|
||||
</LayerGroup>
|
||||
);
|
||||
}
|
||||
1
client/src/components/aircraftlayer/index.ts
Normal file
1
client/src/components/aircraftlayer/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { default } from "./AircraftLayer";
|
||||
Reference in New Issue
Block a user