mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Add theme provider for notes
This commit is contained in:
13 files changed
+205
-198
No files matched your search
@@ -1,18 +1,19 @@
|
||||
import { List, ListItem, ListItemText } from '@material-ui/core';
|
||||
import React from 'react';
|
||||
|
||||
import { useNoteModal } from '../hooks/useNoteModal';
|
||||
import { List, ListItem, ListItemText } from '@material-ui/core';
|
||||
import { useNoteDetail } from '../hooks/useNoteDetail';
|
||||
import { useNotes } from '../hooks/useNotes';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
|
||||
// add search bar later
|
||||
// TODO: Add interface for note
|
||||
const NoteList = ({ notes }) => {
|
||||
const { setNoteModal } = useNoteModal();
|
||||
const NoteList = () => {
|
||||
const history = useHistory();
|
||||
const { notes } = useNotes();
|
||||
const { setDetail } = useNoteDetail();
|
||||
|
||||
const handleNoteModal = (note) => {
|
||||
setNoteModal(true);
|
||||
setDetail(note);
|
||||
history.push('/notes/detail');
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user