mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 06:28:51 +00:00
feat(notes/nui): interface for useNoteDetail
This commit is contained in:
1 parent
5960524b98
commit
1ec30f341a
1 file changed
+7
-1
@@ -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 };
|
||||
}
|
||||
Reference in new issue
Block a user