[COMMAND MENU ITEMS] Remove deprecated code (#19199)
This PR is the first one of a cleanup after upgrading command menu items to V2.
This commit is contained in:
+2
-9
@@ -11,12 +11,10 @@ import { PageHeaderToggleSidePanelButton } from '@/ui/layout/page-header/compone
|
||||
import { PageHeader } from '@/ui/layout/page/components/PageHeader';
|
||||
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
|
||||
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
|
||||
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
|
||||
import { styled } from '@linaria/react';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { themeCssVariables } from 'twenty-ui/theme-constants';
|
||||
import { FeatureFlagKey } from '~/generated-metadata/graphql';
|
||||
|
||||
const StyledTitleWithSelectedRecords = styled.div`
|
||||
display: flex;
|
||||
@@ -69,9 +67,6 @@ export const RecordIndexPageHeader = () => {
|
||||
const isLayoutCustomizationModeEnabled = useAtomStateValue(
|
||||
isLayoutCustomizationModeEnabledState,
|
||||
);
|
||||
const isCommandMenuItemEnabled = useIsFeatureEnabled(
|
||||
FeatureFlagKey.IS_COMMAND_MENU_ITEM_ENABLED,
|
||||
);
|
||||
|
||||
return (
|
||||
<PageHeader
|
||||
@@ -83,10 +78,8 @@ export const RecordIndexPageHeader = () => {
|
||||
{isDefined(contextStoreCurrentViewId) && (
|
||||
<>
|
||||
<RecordIndexCommandMenu />
|
||||
{isCommandMenuItemEnabled ? (
|
||||
!isLayoutCustomizationModeEnabled && (
|
||||
<CommandMenuItemMoreActionsButton />
|
||||
)
|
||||
{!isLayoutCustomizationModeEnabled ? (
|
||||
<CommandMenuItemMoreActionsButton />
|
||||
) : (
|
||||
<PageHeaderToggleSidePanelButton />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user