mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 06:28:51 +00:00
feat(notes/nui): New hook and state for NoteItem details
This commit is contained in:
1 parent
a3e63a40b5
commit
1c1c9b0611
2 files changed
+12
-1
No files matched your search
@@ -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 };
|
||||
}
|
||||
Reference in new issue
Block a user