Files
dcs_liberation/client/src/components/frontlineslayer/FrontLinesLayer.tsx
2023-06-16 22:05:12 -07:00

16 lines
465 B
TypeScript

import { selectFrontLines } from "../../api/frontLinesSlice";
import { useAppSelector } from "../../app/hooks";
import FrontLine from "../frontline";
import { LayerGroup } from "react-leaflet";
export default function FrontLinesLayer() {
const fronts = useAppSelector(selectFrontLines).fronts;
return (
<LayerGroup>
{Object.values(fronts).map((front, idx) => {
return <FrontLine key={idx} front={front} />;
})}
</LayerGroup>
);
}