feat(notes/nui): interface for useNoteDetail

This commit is contained in:
Christopher committed 2021-01-14 20:19:22 +01:00
1 parent 5960524b98
commit 1ec30f341a
1 file changed
+7 -1
+7 -1
View File
@@ -1,7 +1,13 @@
import { useRecoilState } from 'recoil';
import { Note } from '../../../common/typings/notes';
import { noteStates } from './state';
export const useNoteDetail = (): any => {
interface NoteDetailProps {
detail: Note;
setDetail: (note: object) => void;
}
export const useNoteDetail = (): NoteDetailProps => {
const [detail, setDetail] = useRecoilState(noteStates.noteDetail);
return { detail, setDetail };
}