import { NotificationPayload, ValidationFailed, ValidationSuccess } from "@repo/db"; import { BaseNotification } from "_components/customToasts/BaseNotification"; import { MapStore, useMapStore } from "_store/mapStore"; import { Check, Cross } from "lucide-react"; import toast, { Toast } from "react-hot-toast"; export const HPGnotificationToast = ({ event, t, mapStore, }: { event: ValidationFailed | ValidationSuccess; t: Toast; mapStore: MapStore; }) => { const handleClick = () => { toast.dismiss(t.id); mapStore.setOpenMissionMarker({ open: [{ id: event.data.mission.id, tab: "home" }], close: [], }); mapStore.setMap({ center: [event.data.mission.addressLat, event.data.mission.addressLng], zoom: 14, }); }; if (event.status === "failed") { return ( } className="flex flex-row">

HPG validierung fehlgeschlagen

{event.message}

); } else { return ( } className="flex flex-row">

HPG validierung erfolgreich

{event.message}

); } };