Add theme provider for notes

This commit is contained in:
J Francisco Rader committed 2021-02-21 12:49:09 -05:00
1 parent 4acb214ec9
commit 9f04ac3243
13 files changed
+205 -198

No files matched your search

+7 -6
View File
@@ -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 (