mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-20 09:20:16 +00:00
Add teaching bubbles for mongo quickstart (#1313)
This commit is contained in:
@@ -132,12 +132,13 @@ export const useTabs: UseStore<TabsState> = create((set, get) => ({
|
||||
},
|
||||
closeReactTab: (tabKind: ReactTabKind) => {
|
||||
const { activeReactTab, openedTabs, openedReactTabs } = get();
|
||||
const updatedOpenedReactTabs = openedReactTabs.filter((tab: ReactTabKind) => tabKind !== tab);
|
||||
if (activeReactTab === tabKind) {
|
||||
openedTabs?.length > 0
|
||||
? set({ activeTab: openedTabs[0], activeReactTab: undefined })
|
||||
: set({ activeTab: undefined, activeReactTab: openedReactTabs[0] });
|
||||
: set({ activeTab: undefined, activeReactTab: updatedOpenedReactTabs[0] });
|
||||
}
|
||||
|
||||
set({ openedReactTabs: openedReactTabs.filter((tab: ReactTabKind) => tabKind !== tab) });
|
||||
set({ openedReactTabs: updatedOpenedReactTabs });
|
||||
},
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user