feat(notes/nui): New hook and state for NoteItem details

This commit is contained in:
chip committed 2020-10-30 00:06:27 +01:00
1 parent a3e63a40b5
commit 1c1c9b0611
2 files changed
+12 -1

No files matched your search

+5 -1
View File
@@ -7,6 +7,10 @@ export const noteStates = {
}),
noteModal: atom({
key: 'noteModal',
default: true
default: false
}),
noteDetail: atom({
key: 'noteDetail',
default: null
})
}
@@ -0,0 +1,7 @@
import { useRecoilState } from 'recoil';
import { noteStates } from './state';
export const useNoteDetail = (): any => {
const [detail, setDetail] = useRecoilState(noteStates.noteDetail);
return { detail, setDetail };
}