aboutsummaryrefslogtreecommitdiffstats
path: root/apps/Notes/components/Export.js
diff options
context:
space:
mode:
authorGravatar piotrruss <mail@pruss.it> 2021-09-06 23:13:22 +0200
committerGravatar piotrruss <mail@pruss.it> 2021-09-06 23:13:22 +0200
commit569bdb8c5d7538fa0ea8a99ff2f8376f7cbfa51a (patch)
tree8d1cb94a56d60b9d726222277b7516fc59895613 /apps/Notes/components/Export.js
parent275bd1d0a9aea90696c145cf992d522a0d6b0aa8 (diff)
downloadmy_apps-569bdb8c5d7538fa0ea8a99ff2f8376f7cbfa51a.tar.gz
my_apps-569bdb8c5d7538fa0ea8a99ff2f8376f7cbfa51a.tar.bz2
my_apps-569bdb8c5d7538fa0ea8a99ff2f8376f7cbfa51a.zip
added stadard linter
Diffstat (limited to 'apps/Notes/components/Export.js')
-rw-r--r--apps/Notes/components/Export.js22
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>