diff options
author | 2021-08-14 19:13:46 +0200 | |
---|---|---|
committer | 2021-08-14 19:13:46 +0200 | |
commit | 26721219802be2ae9655943e610554a1b47eafbd (patch) | |
tree | d1cd5bf34ee9ef05ea07c35b8f77c39ddac2d4c2 /apps/Notes/components/List.js | |
parent | f6557f602f5124d5c90019cd90cf5257dbc00ef5 (diff) | |
download | my_apps-26721219802be2ae9655943e610554a1b47eafbd.tar.gz my_apps-26721219802be2ae9655943e610554a1b47eafbd.tar.bz2 my_apps-26721219802be2ae9655943e610554a1b47eafbd.zip |
copy to clipboard, icons, notes key
Diffstat (limited to 'apps/Notes/components/List.js')
-rw-r--r-- | apps/Notes/components/List.js | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/apps/Notes/components/List.js b/apps/Notes/components/List.js index 19a5643..a4e0e8f 100644 --- a/apps/Notes/components/List.js +++ b/apps/Notes/components/List.js @@ -5,8 +5,7 @@ import useSort from '../hooks/useSort' import fetchJson from 'lib/fetchJson' import {Layout} from 'components' import ListItem from './ListItem' -import NoteView from './NoteView' -import Note from './Note' +import Actions from './Actions' const List = () => { const [fetchedNote, setFetchedNote] = useState() @@ -27,10 +26,12 @@ const List = () => { return ( <> { - action === '' && ( + action === '' ? ( <> <div className='window__submenu'> <div onClick={() => setAction('addNote')}>New note</div> + {/*<div onClick={() => setAction('import')}>Import</div> + <div onClick={() => {}}>Export</div>*/} </div> <table className="list"> <thead> @@ -58,31 +59,12 @@ const List = () => { </tbody> </table> </> - ) - } - { - action === 'addNote' && ( - <Note + ) : ( + <Actions action={action} setAction={setAction} - /> - ) - } - { - action === 'showNote' && ( - <NoteView fetchedNote={fetchedNote} setFetchedNote={setFetchedNote} - setAction={setAction} - /> - ) - } - { - action === 'editNote' && ( - <Note - action={action} - setAction={setAction} - fetchedNote={fetchedNote} /> ) } |