Skip to content
This repository was archived by the owner on May 3, 2025. It is now read-only.

Commit 6fda06a

Browse files
Add handleSave function as a dependency to useKeyboardShortcut hook call (#211)
1 parent fc8cbc0 commit 6fda06a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/workstation/file-tab.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,10 @@ const FileTab: React.FC<FileTabProps> = (props: FileTabProps) => {
129129
]
130130
);
131131

132-
const { label } = useKeyboardShortcut(`${Key.Control}+s`, () =>
133-
handleSave()()
132+
const { label } = useKeyboardShortcut(
133+
`${Key.Control}+s`,
134+
() => handleSave()(),
135+
[handleSave]
134136
);
135137

136138
const handleRevertToSavedClick = useCallback(

0 commit comments

Comments
 (0)