#46 Einsatz-Marker & Chat/Report disabled wenn nicht verbunden
This commit is contained in:
20
apps/dispatch/app/_components/map/MapAdditionals.tsx
Normal file
20
apps/dispatch/app/_components/map/MapAdditionals.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
"use client";
|
||||
import { usePannelStore } from "_store/pannelStore";
|
||||
import { Marker } from "react-leaflet";
|
||||
import L from "leaflet";
|
||||
|
||||
export const MapAdditionals = () => {
|
||||
const missionForm = usePannelStore((state) => state.missionFormValues);
|
||||
|
||||
if (!missionForm?.addressLat || !missionForm?.addressLng) return null;
|
||||
|
||||
return (
|
||||
<>
|
||||
<Marker
|
||||
position={[missionForm.addressLat, missionForm.addressLng]}
|
||||
icon={L.icon({ iconUrl: "/icons/mapMarker.png", iconSize: [40, 40], iconAnchor: [20, 35] })}
|
||||
interactive={false}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user