diff options
Diffstat (limited to 'apps/Notes/components/Export.js')
-rw-r--r-- | apps/Notes/components/Export.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/apps/Notes/components/Export.js b/apps/Notes/components/Export.js index eeeab8f..4ab1d64 100644 --- a/apps/Notes/components/Export.js +++ b/apps/Notes/components/Export.js @@ -1,12 +1,12 @@ import styles from '../styles/Notes.module.scss' -import React, {useState} from 'react' +import React, { useState } from 'react' import useSettings from 'hooks/useSettings' import useNotes from '../hooks/useNotes' -import {handleSelect, handleSelectAll, handleExport} from '../helpers/export' +import { handleSelect, handleSelectAll, handleExport } from '../helpers/export' -const Export = ({setAction}) => { - const {notes} = useNotes() - const {t} = useSettings() +const Export = ({ setAction }) => { + const { notes } = useNotes() + const { t } = useSettings() const [ids, setIds] = useState(notes.map(n => n.noteId)) const sortFn = (a, b) => new Date(b.updated_at) - new Date(a.updated_at) @@ -16,21 +16,21 @@ const Export = ({setAction}) => { <section> <div className='window__submenu'> <div> - <div onClick={() => {setAction('')}}>{t('back')}</div> + <div onClick={() => { setAction('') }}>{t('back')}</div> </div> </div> <div className={`window__scroll ${styles.export}`}> <h3>{t('notes_click_to_export')}</h3> <input - className="window__button" - type="submit" + className='window__button' + type='submit' value={t('export')} onClick={e => handleExport(e, ids, notes)} /> <p>{t('notes_to_export')}</p> <div className={styles.export__select}> <input - type="checkbox" + type='checkbox' name='selectAll' onChange={e => handleSelectAll(e, notes, setIds)} checked={notes.length === ids.length} @@ -41,7 +41,7 @@ const Export = ({setAction}) => { {notes.sort(sortFn).map(note => ( <li key={note.noteId}> <input - type="checkbox" + type='checkbox' name={note.noteId} value={note.noteId} checked={ids.includes(note.noteId)} @@ -49,7 +49,7 @@ const Export = ({setAction}) => { /> <label htlmfor={note.noteId}> {note.title} - </label><br/> + </label><br /> </li> ))} </ul> |