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
This commit is contained in:
@ -26,7 +26,7 @@ import { useUserLookupAdminPanelMutation } from '~/generated/graphql';
|
|||||||
import { currentUserState } from '@/auth/states/currentUserState';
|
import { currentUserState } from '@/auth/states/currentUserState';
|
||||||
import { SettingsAdminTableCard } from '@/settings/admin-panel/components/SettingsAdminTableCard';
|
import { SettingsAdminTableCard } from '@/settings/admin-panel/components/SettingsAdminTableCard';
|
||||||
import { SettingsAdminVersionContainer } from '@/settings/admin-panel/components/SettingsAdminVersionContainer';
|
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 { activeTabIdComponentState } from '@/ui/layout/tab/states/activeTabIdComponentState';
|
||||||
import { useRecoilComponentStateV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentStateV2';
|
import { useRecoilComponentStateV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentStateV2';
|
||||||
import { getImageAbsoluteURI, isDefined } from 'twenty-shared/utils';
|
import { getImageAbsoluteURI, isDefined } from 'twenty-shared/utils';
|
||||||
@ -38,21 +38,13 @@ const StyledContainer = styled.div`
|
|||||||
gap: ${({ theme }) => theme.spacing(2)};
|
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 = () => {
|
export const SettingsAdminGeneral = () => {
|
||||||
const [userIdentifier, setUserIdentifier] = useState('');
|
const [userIdentifier, setUserIdentifier] = useState('');
|
||||||
const { enqueueSnackBar } = useSnackBar();
|
const { enqueueSnackBar } = useSnackBar();
|
||||||
|
|
||||||
const [activeTabId, setActiveTabId] = useRecoilComponentStateV2(
|
const [activeTabId, setActiveTabId] = useRecoilComponentStateV2(
|
||||||
activeTabIdComponentState,
|
activeTabIdComponentState,
|
||||||
'settings-admin-general',
|
SETTINGS_ADMIN_USER_LOOKUP_WORKSPACE_TABS_ID,
|
||||||
);
|
);
|
||||||
const [userLookupResult, setUserLookupResult] = useRecoilState(
|
const [userLookupResult, setUserLookupResult] = useRecoilState(
|
||||||
userLookupResultState,
|
userLookupResultState,
|
||||||
@ -199,14 +191,11 @@ export const SettingsAdminGeneral = () => {
|
|||||||
title={t`Workspaces`}
|
title={t`Workspaces`}
|
||||||
description={t`All workspaces this user is a member of`}
|
description={t`All workspaces this user is a member of`}
|
||||||
/>
|
/>
|
||||||
<StyledTabListContainer>
|
<TabList
|
||||||
<TabList
|
tabs={tabs}
|
||||||
tabs={tabs}
|
behaveAsLinks={false}
|
||||||
behaveAsLinks={false}
|
componentInstanceId={SETTINGS_ADMIN_USER_LOOKUP_WORKSPACE_TABS_ID}
|
||||||
componentInstanceId={SETTINGS_ADMIN_GENERAL_TABS_ID}
|
/>
|
||||||
/>
|
|
||||||
</StyledTabListContainer>
|
|
||||||
|
|
||||||
<SettingsAdminWorkspaceContent activeWorkspace={activeWorkspace} />
|
<SettingsAdminWorkspaceContent activeWorkspace={activeWorkspace} />
|
||||||
</Section>
|
</Section>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
export const SETTINGS_ADMIN_GENERAL_TABS_ID = 'settings-admin-general-tabs-id';
|
|
||||||
Reference in New Issue
Block a user