mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
23 lines
449 B
TypeScript
23 lines
449 B
TypeScript
import { LatLng } from "../../api/liberationApi";
|
|
import { Polygon } from "react-leaflet";
|
|
|
|
interface ThreatZoneProps {
|
|
poly: LatLng[];
|
|
blue: boolean;
|
|
}
|
|
|
|
export default function ThreatZone(props: ThreatZoneProps) {
|
|
const color = props.blue ? "#0084ff" : "#c85050";
|
|
return (
|
|
<Polygon
|
|
positions={props.poly}
|
|
color={color}
|
|
weight={1}
|
|
fill
|
|
fillOpacity={0.4}
|
|
noClip
|
|
interactive={false}
|
|
/>
|
|
);
|
|
}
|