Files
twenty/front/src/modules/ui/layout/components/PageHotkeysEffect.tsx
T
84a27b148f Feat/sidecar components (#1578)
* 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>
2023-09-14 17:04:45 -07:00

15 lines
400 B
TypeScript

import { TableHotkeyScope } from '@/ui/table/types/TableHotkeyScope';
import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys';
type OwnProps = {
onAddButtonClick?: () => void;
};
export function PageHotkeysEffect({ onAddButtonClick }: OwnProps) {
useScopedHotkeys('c', () => onAddButtonClick?.(), TableHotkeyScope.Table, [
onAddButtonClick,
]);
return <></>;
}