Skip to content

Commit

Permalink
fix: build with warning
Browse files Browse the repository at this point in the history
  • Loading branch information
danloh committed Mar 7, 2024
1 parent f70ba5d commit 7ab0396
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/note/NoteNewModal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useMemo } from 'react';
import { useCallback, useMemo } from 'react';
import useHotkeys from 'editor/hooks/useHotkeys';
import { store } from 'lib/store';
import FindOrCreateInput from './NoteNewInput';
Expand All @@ -10,10 +10,10 @@ type Props = {
export default function FindOrCreateModal(props: Props) {
const { setIsOpen } = props;

const handleClose = () => {
const handleClose = useCallback(() => {
store.getState().setCurrentCard(undefined);
setIsOpen(false)
}
}, [setIsOpen])

const hotkeys = useMemo(
() => [
Expand All @@ -22,7 +22,7 @@ export default function FindOrCreateModal(props: Props) {
callback: () => handleClose(),
},
],
[setIsOpen]
[handleClose]
);
useHotkeys(hotkeys);

Expand Down

0 comments on commit 7ab0396

Please sign in to comment.