Fix actions setter when opening the command menu (#8263)
Fix standard actions overriding navigate and create commands when opening the command menu. Before fix: <img width="493" alt="Capture d’écran 2024-10-31 à 18 08 56" src="https://github.com/user-attachments/assets/015bd798-baa4-4f84-8886-e355c0ef1455"> After fix: <img width="499" alt="Capture d’écran 2024-10-31 à 18 08 34" src="https://github.com/user-attachments/assets/02ba7fc4-ec90-4c13-9830-d884c0da37d9"> --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -1,16 +0,0 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useSetRecoilState } from 'recoil';
|
||||
|
||||
import { COMMAND_MENU_COMMANDS } from '@/command-menu/constants/CommandMenuCommands';
|
||||
import { commandMenuCommandsState } from '@/command-menu/states/commandMenuCommandsState';
|
||||
|
||||
export const CommandMenuEffect = () => {
|
||||
const setCommands = useSetRecoilState(commandMenuCommandsState);
|
||||
|
||||
const commands = Object.values(COMMAND_MENU_COMMANDS);
|
||||
useEffect(() => {
|
||||
setCommands(commands);
|
||||
}, [commands, setCommands]);
|
||||
|
||||
return <></>;
|
||||
};
|
||||
Reference in New Issue
Block a user