8976 modify mobile page header (#9020)

Closes #8976
This commit is contained in:
Raphaël Bosi
2024-12-11 15:06:09 +01:00
committed by GitHub
parent 6067852c1c
commit ad04040ea6
5 changed files with 43 additions and 29 deletions

View File

@ -10,6 +10,7 @@ import { ActionMenuContext } from '@/action-menu/contexts/ActionMenuContext';
import { contextStoreCurrentObjectMetadataIdComponentState } from '@/context-store/states/contextStoreCurrentObjectMetadataIdComponentState';
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
import { useIsMobile } from 'twenty-ui';
export const RecordIndexActionMenu = () => {
const contextStoreCurrentObjectMetadataId = useRecoilComponentValueV2(
@ -22,6 +23,8 @@ export const RecordIndexActionMenu = () => {
'IS_PAGE_HEADER_V2_ENABLED',
);
const isMobile = useIsMobile();
return (
<>
{contextStoreCurrentObjectMetadataId && (
@ -32,7 +35,7 @@ export const RecordIndexActionMenu = () => {
}}
>
{isPageHeaderV2Enabled ? (
<RecordIndexActionMenuButtons />
<>{!isMobile && <RecordIndexActionMenuButtons />}</>
) : (
<RecordIndexActionMenuBar />
)}