feat(notes/nui): interface for useNoteModal

This commit is contained in:
Christopher committed 2021-01-14 20:09:09 +01:00
1 parent 20e03e4981
commit 92579dd213
1 file changed
+6 -1
+6 -1
View File
@@ -1,7 +1,12 @@
import { useRecoilState } from 'recoil';
import { noteStates } from './state';
export const useNoteModal = () => {
interface NoteModalProps {
noteModal: boolean;
setNoteModal: (show: boolean) => void;
}
export const useNoteModal = (): NoteModalProps => {
const [noteModal, setNoteModal] = useRecoilState(noteStates.noteModal);
return { noteModal, setNoteModal };
}