aboutsummaryrefslogtreecommitdiffstats
path: root/apps/Notes/components/Export.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/Notes/components/Export.js')
-rw-r--r--apps/Notes/components/Export.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/Notes/components/Export.js b/apps/Notes/components/Export.js
index e7966e4..0838cea 100644
--- a/apps/Notes/components/Export.js
+++ b/apps/Notes/components/Export.js
@@ -1,10 +1,12 @@
import styles from '../Notes.module.scss'
import React, {useState} from 'react'
+import useSettings from 'hooks/useSettings'
import useNotes from '../hooks/useNotes'
import {handleSelect, handleSelectAll, handleExport} from '../helpers/export'
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)
@@ -13,17 +15,17 @@ const Export = ({setAction}) => {
return (
<section>
<div className='window__submenu'>
- <div onClick={() => {setAction('')}}>Back</div>
+ <div onClick={() => {setAction('')}}>{t('back')}</div>
</div>
<div className={`window__scroll ${styles.export}`}>
- <h3>Click to export your notes:</h3>
+ <h3>{t('notes_click_to_export')}</h3>
<input
className="window__button"
type="submit"
- value="Export"
+ value={t('export')}
onClick={e => handleExport(e, ids, notes)}
/>
- <p>Notes to export:</p>
+ <p>{t('notes_to_export')}</p>
<div className={styles.export__select}>
<input
type="checkbox"
@@ -31,7 +33,7 @@ const Export = ({setAction}) => {
onChange={e => handleSelectAll(e, notes, setIds)}
checked={notes.length === ids.length}
/>
- <label htmlFor='selectAll'>Select all</label>
+ <label htmlFor='selectAll'>{t('select_all')}</label>
</div>
<ul>
{notes.sort(sortFn).map(note => (