Mission Popup WIP

This commit is contained in:
nocnico
2025-04-21 23:57:18 +02:00
parent 391d216374
commit 1329e6b5e9
4 changed files with 154 additions and 22 deletions

View File

@@ -58,6 +58,13 @@ interface MapStore {
aircraftId: string,
tab: MapStore["aircraftTabs"][string],
) => void;
missionTabs: {
[missionId: string]: "home" | "details" | "chat";
};
setMissionTab: (
missionId: string,
tab: MapStore["missionTabs"][string],
) => void;
}
export const useMapStore = create<MapStore>((set, get) => ({
@@ -106,4 +113,12 @@ export const useMapStore = create<MapStore>((set, get) => ({
[aircraftId]: tab,
},
})),
missionTabs: {},
setMissionTab: (missionId, tab) =>
set((state) => ({
missionTabs: {
...state.missionTabs,
[missionId]: tab,
},
})),
}));