583 refactor useCommandMenu hook (#10984)

Closes https://github.com/twentyhq/core-team-issues/issues/583

- Split hook into smaller hooks
- Create tests
This commit is contained in:
Raphaël Bosi
2025-03-18 15:37:28 +01:00
committed by GitHub
parent 324794707a
commit 2680f1d6be
48 changed files with 2120 additions and 918 deletions

View File

@ -6,7 +6,7 @@ import {
isModifiedEvent,
} from 'twenty-ui';
import { useCommandMenu } from '@/command-menu/hooks/useCommandMenu';
import { useOpenRecordInCommandMenu } from '@/command-menu/hooks/useOpenRecordInCommandMenu';
import { getLinkToShowPage } from '@/object-metadata/utils/getLinkToShowPage';
import { useRecordChipData } from '@/object-record/hooks/useRecordChipData';
import { recordIndexOpenRecordInState } from '@/object-record/record-index/states/recordIndexOpenRecordInState';
@ -39,7 +39,7 @@ export const RecordChip = ({
record,
});
const { openRecordInCommandMenu } = useCommandMenu();
const { openRecordInCommandMenu } = useOpenRecordInCommandMenu();
const recordIndexOpenRecordIn = useRecoilValue(recordIndexOpenRecordInState);