added Callback and custon notification Toast, client notification event handler

This commit is contained in:
PxlLoewe
2025-05-22 00:43:03 -07:00
parent 0f04174516
commit 8a4b42f02b
38 changed files with 715 additions and 339 deletions

View File

@@ -1,7 +1,7 @@
import { OSMWay } from "@repo/db";
import { create } from "zustand";
interface MapStore {
export interface MapStore {
contextMenu: {
lat: number;
lng: number;
@@ -10,6 +10,7 @@ interface MapStore {
center: L.LatLngExpression;
zoom: number;
};
setMap: (map: MapStore["map"]) => void;
openMissionMarker: {
id: number;
tab: "home" | "details" | "patient" | "log";
@@ -67,19 +68,24 @@ export const useMapStore = create<MapStore>((set, get) => ({
center: [51.5, 10.5],
zoom: 6,
},
setMap: (map) => {
set(() => ({
map,
}));
},
searchPopup: null,
searchElements: [],
setSearchPopup: (popup) =>
set((state) => ({
set(() => ({
searchPopup: popup,
})),
contextMenu: null,
setContextMenu: (contextMenu) =>
set((state) => ({
set(() => ({
contextMenu,
})),
setSearchElements: (elements) =>
set((state) => ({
set(() => ({
searchElements: elements,
})),
aircraftTabs: {},