aboutsummaryrefslogtreecommitdiffstats
path: root/apps/Notes/components/List.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/Notes/components/List.js')
-rw-r--r--apps/Notes/components/List.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/apps/Notes/components/List.js b/apps/Notes/components/List.js
index 1fd03af..9655d74 100644
--- a/apps/Notes/components/List.js
+++ b/apps/Notes/components/List.js
@@ -1,6 +1,7 @@
import styles from '../Notes.module.scss'
import React, {useState, useEffect} from 'react'
-import useUser from 'lib/useUser'
+import useUser from 'hooks/useUser'
+import useSettings from 'hooks/useSettings'
import useNotes from '../hooks/useNotes'
import useSort from '../hooks/useSort'
import ListItem from './ListItem'
@@ -13,6 +14,7 @@ const List = () => {
const [loading, setLoading] = useState(false)
const {notes, error} = useNotes()
const [sortedBy, sortBy, sortFn] = useSort(3)
+ const {t} = useSettings()
const {user} = useUser({
redirectToLogin: true,
redirectToVerify: true,
@@ -32,16 +34,16 @@ const List = () => {
action === '' ? (
<>
<div className='window__submenu'>
- <div onClick={() => setAction('addNote')}>New note</div>
- <div onClick={() => setAction('importNotes')}>Import</div>
- <div onClick={() => setAction('exportNotes')}>Export</div>
+ <div onClick={() => setAction('addNote')}>{t('notes_new')}</div>
+ <div onClick={() => setAction('importNotes')}>{t('import')}</div>
+ <div onClick={() => setAction('exportNotes')}>{t('export')}</div>
</div>
<table className={styles.notesList}>
<thead>
<tr>
- <th onClick={() => sortBy(1)}>Title {sortedBy(1)}</th>
- <th onClick={() => sortBy(2)}>Created {sortedBy(2)}</th>
- <th onClick={() => sortBy(3)}>Modified {sortedBy(3)}</th>
+ <th onClick={() => sortBy(1)}>{t('title')} {sortedBy(1)}</th>
+ <th onClick={() => sortBy(2)}>{t('created')} {sortedBy(2)}</th>
+ <th onClick={() => sortBy(3)}>{t('modified')} {sortedBy(3)}</th>
</tr>
</thead>
<tbody>
@@ -57,7 +59,7 @@ const List = () => {
/>
))) : (
<tr>
- <td>Your notes list is empty.</td>
+ <td>{t('notes_list_empty')}</td>
</tr>
)}
</tbody>