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 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 = () => {
|
||||
const { setNoteModal } = useNoteModal();
|
||||
const { detail, setDetail } = useNoteDetail();
|
||||
const notes = useNotes();
|
||||
const { notes } = useNotes();
|
||||
const notesApp = useApp('NOTES');
|
||||
|
||||
const classes = useStyles();
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import { Note } from '../../../common/typings/notes';
|
||||
import { noteStates } from './state';
|
||||
|
||||
export const useNotes = () => {
|
||||
interface NotesProps {
|
||||
notes: Note[];
|
||||
}
|
||||
|
||||
export const useNotes = (): NotesProps => {
|
||||
const notes = useRecoilValue(noteStates.noteItems);
|
||||
return notes;
|
||||
return { notes };
|
||||
}
|
||||
Reference in new issue
Block a user