diff --git a/phone/src/apps/notes/DoucmentsApp.tsx b/phone/src/apps/notes/DoucmentsApp.tsx index 0b4186e..63d3c8c 100644 --- a/phone/src/apps/notes/DoucmentsApp.tsx +++ b/phone/src/apps/notes/DoucmentsApp.tsx @@ -15,20 +15,12 @@ import DocumentList from './list/DoucmentList'; import NoteList from './list/NoteList'; export const NotesApp = () => { - const classes = useStyles(); - const history = useHistory(); - const notesApp = useApp('DOCUMENTS'); - const { setDetail } = useNoteDetail(); - - const onClickCreate = () => { - setDetail({ title: '', content: '' }); - history.push('/notes/detail'); - }; + const documentsApp = useApp('DOCUMENTS'); return ( - + diff --git a/phone/src/apps/notes/list/NoteList.tsx b/phone/src/apps/notes/list/NoteList.tsx index 84d4461..09287f9 100644 --- a/phone/src/apps/notes/list/NoteList.tsx +++ b/phone/src/apps/notes/list/NoteList.tsx @@ -1,9 +1,10 @@ import React from 'react'; -import { List, ListItem, ListItemText } from '@material-ui/core'; +import { Fab, List, ListItem, ListItemText } from '@material-ui/core'; import { useNoteDetail } from '../hooks/useNoteDetail'; import { useNotes } from '../hooks/useNotes'; import { useHistory } from 'react-router-dom'; import useStyles from '../documents.styles'; +import AddIcon from '@material-ui/icons/Add'; // add search bar later // TODO: Add interface for note @@ -18,14 +19,24 @@ const NoteList = () => { history.push('/documents/notes/detail'); }; + const onClickCreate = () => { + setDetail({ title: '', content: '' }); + history.push('/documents/notes/detail'); + }; + return ( - - {notes.map((note) => ( - handleNoteModal(note)}> - - - ))} - +
+ + {notes.map((note) => ( + handleNoteModal(note)}> + + + ))} + + + + +
); };