diff --git a/thirdeye-ui/src/app/components/app-bar/app-header/app-header.component.tsx b/thirdeye-ui/src/app/components/app-bar/app-header/app-header.component.tsx index 97d30118a4..6fe48e30dc 100644 --- a/thirdeye-ui/src/app/components/app-bar/app-header/app-header.component.tsx +++ b/thirdeye-ui/src/app/components/app-bar/app-header/app-header.component.tsx @@ -29,7 +29,7 @@ export const Appheader = ({ }: AppHeaderprops): ReactElement => { const { t } = useTranslation(); const [navBarMinimized] = useNavBarV1((state) => [state.navBarMinimized]); - const showWorkspaceSwitcher = Boolean(workspaces && workspaces?.length > 1); + const showWorkspaceSwitcher = Boolean(workspaces); const compoenentStyles = useAppHeaderStyles({ showWorkspaceSwitcher, isFullScreen, diff --git a/thirdeye-ui/src/app/components/app-bar/app-header/workspace.tsx b/thirdeye-ui/src/app/components/app-bar/app-header/workspace.tsx index c1baf661b3..8ad8a6a0c2 100644 --- a/thirdeye-ui/src/app/components/app-bar/app-header/workspace.tsx +++ b/thirdeye-ui/src/app/components/app-bar/app-header/workspace.tsx @@ -98,19 +98,17 @@ export const WorkspaceSwitcher = ({ value={selectedWorkspace.id || ""} onClick={() => setOpen(!open)} > - {workspaces.length > 1 && ( - - { - handleFilter(e.target.value); - }} - // prevent selecting search box - onClick={(e) => e.stopPropagation()} - /> - - )} + + { + handleFilter(e.target.value); + }} + // prevent selecting search box + onClick={(e) => e.stopPropagation()} + /> +
{filteredWorkspaces.map((workspace, index) => (