mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
feat(notes/nui): interface for useNotes
This commit is contained in:
1 parent
92579dd213
commit
5960524b98
2 files changed
+8
-3
No files matched your search
@@ -18,7 +18,7 @@ import useStyles from './notes.styles';
|
|||||||
export const NotesApp = () => {
|
export const NotesApp = () => {
|
||||||
const { setNoteModal } = useNoteModal();
|
const { setNoteModal } = useNoteModal();
|
||||||
const { detail, setDetail } = useNoteDetail();
|
const { detail, setDetail } = useNoteDetail();
|
||||||
const notes = useNotes();
|
const { notes } = useNotes();
|
||||||
const notesApp = useApp('NOTES');
|
const notesApp = useApp('NOTES');
|
||||||
|
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
import { useRecoilValue } from 'recoil';
|
import { useRecoilValue } from 'recoil';
|
||||||
|
import { Note } from '../../../common/typings/notes';
|
||||||
import { noteStates } from './state';
|
import { noteStates } from './state';
|
||||||
|
|
||||||
export const useNotes = () => {
|
interface NotesProps {
|
||||||
|
notes: Note[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export const useNotes = (): NotesProps => {
|
||||||
const notes = useRecoilValue(noteStates.noteItems);
|
const notes = useRecoilValue(noteStates.noteItems);
|
||||||
return notes;
|
return { notes };
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user