From 1e14a1101933dcfec3f357c590a455649db375ff Mon Sep 17 00:00:00 2001 From: piotrruss Date: Sat, 4 Sep 2021 21:55:21 +0200 Subject: add mobile styles --- apps/Notes/components/List.js | 70 +++++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 29 deletions(-) (limited to 'apps/Notes/components/List.js') diff --git a/apps/Notes/components/List.js b/apps/Notes/components/List.js index 5039061..238e305 100644 --- a/apps/Notes/components/List.js +++ b/apps/Notes/components/List.js @@ -12,6 +12,7 @@ const List = () => { const [fetchedNote, setFetchedNote] = useState() const [action, setAction] = useState('') const [loading, setLoading] = useState(false) + const [showSort, setShowSort] = useState(false) const {notes, error} = useNotes() const [sortedBy, sortBy, sortFn] = useSort(3) const {t} = useSettings() @@ -34,36 +35,47 @@ const List = () => { action === '' ? ( <>
-
setAction('addNote')}>{t('notes_new')}
-
setAction('importNotes')}>{t('import')}
-
setAction('exportNotes')}>{t('export')}
+
+
setAction('addNote')}>{t('notes_new')}
+
{setShowSort(s => !s)}}>{t('sort')}
+
setAction('importNotes')}>{t('import')}
+
setAction('exportNotes')}>{t('export')}
+
+
+
+ + + + + + + + + + + + + + + + { + notes.length > 0 + ? (notes.sort(sortFn).map(note => ( + + ))) : ( + + + + )} + +
{t('sort_by')}
sortBy(1)}>{t('title')} {sortedBy(1)} sortBy(2)}>{t('created')} {sortedBy(2)} sortBy(3)}>{t('modified')} {sortedBy(3)}
setShowSort(false)}>{t('close')}
{t('notes_list_empty')}
- - - - - - - - - - { - notes.length > 0 - ? (notes.sort(sortFn).map(note => ( - - ))) : ( - - - - )} - -
sortBy(1)}>{t('title')} {sortedBy(1)} sortBy(2)}>{t('created')} {sortedBy(2)} sortBy(3)}>{t('modified')} {sortedBy(3)}
{t('notes_list_empty')}
) : (