Add tabs to aircraft popup
This commit is contained in:
@@ -51,6 +51,13 @@ interface MapStore {
|
||||
elementId: number;
|
||||
} | null;
|
||||
setSearchPopup: (popup: MapStore["searchPopup"]) => void;
|
||||
aircraftTabs: {
|
||||
[aircraftId: string]: "home" | "fms" | "aircraft" | "mission" | "chat";
|
||||
};
|
||||
setAircraftTab: (
|
||||
aircraftId: string,
|
||||
tab: MapStore["aircraftTabs"][string],
|
||||
) => void;
|
||||
}
|
||||
|
||||
export const useMapStore = create<MapStore>((set, get) => ({
|
||||
@@ -91,4 +98,12 @@ export const useMapStore = create<MapStore>((set, get) => ({
|
||||
set((state) => ({
|
||||
searchElements: elements,
|
||||
})),
|
||||
aircraftTabs: {},
|
||||
setAircraftTab: (aircraftId, tab) =>
|
||||
set((state) => ({
|
||||
aircraftTabs: {
|
||||
...state.aircraftTabs,
|
||||
[aircraftId]: tab,
|
||||
},
|
||||
})),
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user