* Added a new eslint plugin in TypeScript for Effect components * Fixed edge cases * Fixed lint * Fix eslint --------- Co-authored-by: Charles Bochet <charles@twenty.com>
17 lines
499 B
TypeScript
17 lines
499 B
TypeScript
import { useEffect } from 'react';
|
|
import { useSetRecoilState } from 'recoil';
|
|
|
|
import { commandMenuCommands } from '@/command-menu/constants/commandMenuCommands';
|
|
import { commandMenuCommandsState } from '@/command-menu/states/commandMenuCommandsState';
|
|
|
|
export function CommandMenuEffect() {
|
|
const setCommands = useSetRecoilState(commandMenuCommandsState);
|
|
|
|
const commands = commandMenuCommands;
|
|
useEffect(() => {
|
|
setCommands(commands);
|
|
}, [commands, setCommands]);
|
|
|
|
return <></>;
|
|
}
|