From 65c7f46d5f95c0005bd1e8922f165c405ce5b558 Mon Sep 17 00:00:00 2001 From: Christopher Date: Tue, 16 Mar 2021 11:30:30 +0100 Subject: [PATCH] tweak(phone): rename notes > documents --- phone/src/apps/notes/DoucmentsApp.tsx | 59 +++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 phone/src/apps/notes/DoucmentsApp.tsx diff --git a/phone/src/apps/notes/DoucmentsApp.tsx b/phone/src/apps/notes/DoucmentsApp.tsx new file mode 100644 index 0000000..3f73ec8 --- /dev/null +++ b/phone/src/apps/notes/DoucmentsApp.tsx @@ -0,0 +1,59 @@ +import React from 'react'; +import { AppWrapper } from '../../ui/components/AppWrapper'; +import { AppContent } from '../../ui/components/AppContent'; +import { AppTitle } from '../../ui/components/AppTitle'; +import { useApp } from '../../os/apps/hooks/useApps'; +import { NoteModal } from './modal/NoteModal'; +import { Fab } from '@material-ui/core'; +import AddIcon from '@material-ui/icons/Add'; +import { useNoteDetail } from './hooks/useNoteDetail'; +import useStyles from './notes.styles'; +import InjectDebugData from '../../os/debug/InjectDebugData'; +import { NotesThemeProvider } from './providers/NotesThemeProvider'; +import { Route, useHistory } from 'react-router-dom'; +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'); + }; + + return ( + + + + + + + + + + + ); +}; + +InjectDebugData([ + { + app: 'NOTES', + method: 'setNotes', + data: [ + { + id: 1, + title: 'First note', + content: 'Hello, this is my shitty note', + }, + { + id: 2, + title: 'Second note', + content: 'Hello, this is another shitty note', + }, + ], + }, +]);