added Mission Closed Toeast, enhanced logic

This commit is contained in:
PxlLoewe
2025-07-14 23:57:33 -07:00
parent d7ca0eb166
commit 7be21a738a
7 changed files with 209 additions and 18 deletions

View File

@@ -11,6 +11,7 @@ import { useMapStore } from "_store/mapStore";
import { AdminMessageToast } from "_components/customToasts/AdminMessage";
import { pilotSocket } from "(app)/pilot/socket";
import { QUICK_RESPONSE, StatusToast } from "_components/customToasts/StationStatusToast";
import { MissionAutoCloseToast } from "_components/customToasts/MissionAutoClose";
export function QueryProvider({ children }: { children: ReactNode }) {
const mapStore = useMapStore((s) => s);
@@ -79,6 +80,14 @@ export function QueryProvider({ children }: { children: ReactNode }) {
duration: 60000,
});
break;
case "mission-auto-close":
toast.custom(
(t) => <MissionAutoCloseToast event={notification} t={t} mapStore={mapStore} />,
{
duration: 60000,
},
);
break;
default:
toast("unbekanntes Notification-Event");
break;