* ESLint rule: const naming Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: KlingerMatheus <klinger.matheus@gitstart.dev> * Refactor according to review Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: KlingerMatheus <klinger.matheus@gitstart.dev> * refactor: Reverts changes on `twenty-server` Co-authored-by: KlingerMatheus <klinger.matheus@gitstart.dev> Co-authored-by: v1b3m <vibenjamin6@gmail.com> --------- Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com> Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: KlingerMatheus <klinger.matheus@gitstart.dev>
17 lines
507 B
TypeScript
17 lines
507 B
TypeScript
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 = COMMAND_MENU_COMMANDS;
|
|
useEffect(() => {
|
|
setCommands(commands);
|
|
}, [commands, setCommands]);
|
|
|
|
return <></>;
|
|
};
|