Enabled the ability to close the home tab (#1765)

This commit is contained in:
JustinKol
2024-03-13 16:32:59 -04:00
committed by GitHub
parent 4c74525b5d
commit f881f7fd2f
4 changed files with 25 additions and 7 deletions

View File

@@ -105,7 +105,7 @@ export const useTabs: UseStore<TabsState> = create((set, get) => ({
return true;
});
if (updatedTabs.length === 0 && configContext.platform !== Platform.Fabric) {
set({ activeTab: undefined, activeReactTab: ReactTabKind.Home });
set({ activeTab: undefined, activeReactTab: undefined });
}
if (tab.tabId === activeTab.tabId && tabIndex !== -1) {
@@ -143,7 +143,7 @@ export const useTabs: UseStore<TabsState> = create((set, get) => ({
});
if (get().openedTabs.length === 0 && configContext.platform !== Platform.Fabric) {
set({ activeTab: undefined, activeReactTab: ReactTabKind.Home });
set({ activeTab: undefined, activeReactTab: undefined });
}
}
},