mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Draw front lines on the react map.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
This commit is contained in:
15
client/src/components/frontlineslayer/FrontLinesLayer.tsx
Normal file
15
client/src/components/frontlineslayer/FrontLinesLayer.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import FrontLine from "../frontline";
|
||||
import { LayerGroup } from "react-leaflet";
|
||||
import { selectFrontLines } from "../../api/frontLinesSlice";
|
||||
import { useAppSelector } from "../../app/hooks";
|
||||
|
||||
export default function SupplyRoutesLayer() {
|
||||
const fronts = useAppSelector(selectFrontLines).fronts;
|
||||
return (
|
||||
<LayerGroup>
|
||||
{fronts.map((front, idx) => {
|
||||
return <FrontLine key={idx} front={front} />;
|
||||
})}
|
||||
</LayerGroup>
|
||||
);
|
||||
}
|
||||
1
client/src/components/frontlineslayer/index.ts
Normal file
1
client/src/components/frontlineslayer/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { default } from "./FrontLinesLayer";
|
||||
Reference in New Issue
Block a user