From 2182821fe14e077cc8be80c211389010335eda76 Mon Sep 17 00:00:00 2001
From: nitin <142569587+ehconitin@users.noreply.github.com>
Date: Tue, 25 Mar 2025 21:39:17 +0530
Subject: [PATCH] fixed workspace tabs not working in admin panel (#11164)
fixed a regression on user lookup workspace tabs.
regression caused after this merge
https://github.com/twentyhq/twenty/pull/11008
---
.../components/SettingsAdminGeneral.tsx | 25 ++++++-------------
.../constants/SettingsAdminGeneralTabsId.ts | 1 -
2 files changed, 7 insertions(+), 19 deletions(-)
delete mode 100644 packages/twenty-front/src/modules/settings/admin-panel/constants/SettingsAdminGeneralTabsId.ts
diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminGeneral.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminGeneral.tsx
index 32785da83..999dddb65 100644
--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminGeneral.tsx
+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminGeneral.tsx
@@ -26,7 +26,7 @@ import { useUserLookupAdminPanelMutation } from '~/generated/graphql';
import { currentUserState } from '@/auth/states/currentUserState';
import { SettingsAdminTableCard } from '@/settings/admin-panel/components/SettingsAdminTableCard';
import { SettingsAdminVersionContainer } from '@/settings/admin-panel/components/SettingsAdminVersionContainer';
-import { SETTINGS_ADMIN_GENERAL_TABS_ID } from '@/settings/admin-panel/constants/SettingsAdminGeneralTabsId';
+import { SETTINGS_ADMIN_USER_LOOKUP_WORKSPACE_TABS_ID } from '@/settings/admin-panel/constants/SettingsAdminUserLookupWorkspaceTabsId';
import { activeTabIdComponentState } from '@/ui/layout/tab/states/activeTabIdComponentState';
import { useRecoilComponentStateV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentStateV2';
import { getImageAbsoluteURI, isDefined } from 'twenty-shared/utils';
@@ -38,21 +38,13 @@ const StyledContainer = styled.div`
gap: ${({ theme }) => theme.spacing(2)};
`;
-const StyledTabListContainer = styled.div`
- align-items: center;
- border-bottom: ${({ theme }) => `1px solid ${theme.border.color.light}`};
- box-sizing: border-box;
- display: flex;
- gap: ${({ theme }) => theme.spacing(2)};
-`;
-
export const SettingsAdminGeneral = () => {
const [userIdentifier, setUserIdentifier] = useState('');
const { enqueueSnackBar } = useSnackBar();
const [activeTabId, setActiveTabId] = useRecoilComponentStateV2(
activeTabIdComponentState,
- 'settings-admin-general',
+ SETTINGS_ADMIN_USER_LOOKUP_WORKSPACE_TABS_ID,
);
const [userLookupResult, setUserLookupResult] = useRecoilState(
userLookupResultState,
@@ -199,14 +191,11 @@ export const SettingsAdminGeneral = () => {
title={t`Workspaces`}
description={t`All workspaces this user is a member of`}
/>
-
-
-
-
+
>
diff --git a/packages/twenty-front/src/modules/settings/admin-panel/constants/SettingsAdminGeneralTabsId.ts b/packages/twenty-front/src/modules/settings/admin-panel/constants/SettingsAdminGeneralTabsId.ts
deleted file mode 100644
index 140ad057a..000000000
--- a/packages/twenty-front/src/modules/settings/admin-panel/constants/SettingsAdminGeneralTabsId.ts
+++ /dev/null
@@ -1 +0,0 @@
-export const SETTINGS_ADMIN_GENERAL_TABS_ID = 'settings-admin-general-tabs-id';