diff --git a/phone/src/apps/notes/hooks/state.ts b/phone/src/apps/notes/hooks/state.ts index 4b873e8..9599aa0 100644 --- a/phone/src/apps/notes/hooks/state.ts +++ b/phone/src/apps/notes/hooks/state.ts @@ -7,6 +7,10 @@ export const noteStates = { }), noteModal: atom({ key: 'noteModal', - default: true + default: false + }), + noteDetail: atom({ + key: 'noteDetail', + default: null }) } \ No newline at end of file diff --git a/phone/src/apps/notes/hooks/useNoteDetail.ts b/phone/src/apps/notes/hooks/useNoteDetail.ts new file mode 100644 index 0000000..9faab1e --- /dev/null +++ b/phone/src/apps/notes/hooks/useNoteDetail.ts @@ -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 }; +} \ No newline at end of file