mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
28 lines
619 B
TypeScript
28 lines
619 B
TypeScript
import {
|
|
FrontLine as FrontLineModel,
|
|
useOpenNewFrontLinePackageDialogMutation,
|
|
} from "../../api/liberationApi";
|
|
import { Polyline } from "react-leaflet";
|
|
|
|
interface FrontLineProps {
|
|
front: FrontLineModel;
|
|
}
|
|
|
|
function FrontLine(props: FrontLineProps) {
|
|
const [openNewPackageDialog] = useOpenNewFrontLinePackageDialogMutation();
|
|
return (
|
|
<Polyline
|
|
positions={props.front.extents}
|
|
weight={8}
|
|
color={"#fe7d0a"}
|
|
eventHandlers={{
|
|
contextmenu: () => {
|
|
openNewPackageDialog({ frontLineId: props.front.id });
|
|
},
|
|
}}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export default FrontLine;
|