import { getPublicUser, MissionAutoClose, Prisma } from "@repo/db"; import { JsonValueType } from "@repo/db/zod"; import { useMutation, useQueryClient } from "@tanstack/react-query"; import { BaseNotification } from "_components/customToasts/BaseNotification"; import { editMissionAPI } from "_querys/missions"; import { MapStore } from "_store/mapStore"; import { Clock, X } from "lucide-react"; import { useSession } from "next-auth/react"; import toast, { Toast } from "react-hot-toast"; export const MissionAutoCloseToast = ({ event, t, mapStore, }: { event: MissionAutoClose; t: Toast; mapStore: MapStore; }) => { const { data: session } = useSession(); const queryClient = useQueryClient(); const editMissionMutation = useMutation({ mutationFn: ({ id, mission }: { id: number; mission: Partial }) => editMissionAPI(id, mission), mutationKey: ["missions"], onSuccess: () => { queryClient.invalidateQueries({ queryKey: ["missions"], }); }, }); return ( } className="flex flex-row">

Inaktiver Einsatz wurde automatisch geschlossen

{event.message}

); };