From c66331d367c8b59877a367e62236f5ee6e6764e6 Mon Sep 17 00:00:00 2001 From: nocnico Date: Mon, 17 Mar 2025 21:33:28 +0100 Subject: [PATCH] Status Notifications --- .../app/(dispatch)/_components/Map.tsx | 18 +++++++ .../_components/toast/ToastCard.tsx | 48 +++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/apps/dispatch/app/(dispatch)/_components/Map.tsx b/apps/dispatch/app/(dispatch)/_components/Map.tsx index 7742f257..50dcd834 100644 --- a/apps/dispatch/app/(dispatch)/_components/Map.tsx +++ b/apps/dispatch/app/(dispatch)/_components/Map.tsx @@ -4,6 +4,7 @@ import { useEffect, useRef } from "react"; import L from "leaflet"; import "leaflet/dist/leaflet.css"; import ToastCard from "./toast/ToastCard"; +import { Toast, ToastBar, Toaster, toast } from "react-hot-toast"; export default () => { const mapRef = useRef(null); @@ -27,6 +28,23 @@ export default () => { return (
+
+ +
{ content: `Inhalt von Einsatz #${cards.length + 1}.`, }; setCards([...cards, newCard]); + // DEBUG + /* toast("😖 Christoph 31 sendet Status 4", { + duration: 10000, + }); */ + // DEBUG + const toastId = toast.custom( +
+
+ 😖 Christoph 31 sendet Status 5{" "} + +
+
, + { + duration: 999999999, + }, + ); + // DEBUG }; const removeCard = (id: number) => {