import styles from '../styles/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) if (!notes) return null return (
{ setAction('') }}>{t('back')}

{t('notes_click_to_export')}

handleExport(e, ids, notes)} />

{t('notes_to_export')}

handleSelectAll(e, notes, setIds)} checked={notes.length === ids.length} />
) } export default Export