diff --git a/resources/scripts/components/dashboard/AccountApiContainer.tsx b/resources/scripts/components/dashboard/AccountApiContainer.tsx index fa5c670..fd87367 100644 --- a/resources/scripts/components/dashboard/AccountApiContainer.tsx +++ b/resources/scripts/components/dashboard/AccountApiContainer.tsx @@ -10,6 +10,7 @@ import FlashMessageRender from '@/components/FlashMessageRender'; import { format } from 'date-fns'; import PageContentBlock from '@/components/elements/PageContentBlock'; import tw from 'twin.macro'; +import { useTranslation } from 'react-i18next'; import GreyRowBox from '@/components/elements/GreyRowBox'; import { Dialog } from '@/components/elements/dialog'; import { useFlashKey } from '@/plugins/useFlash'; @@ -19,6 +20,8 @@ import BeforeContent from '@/blueprint/components/Account/API/BeforeContent'; import AfterContent from '@/blueprint/components/Account/API/AfterContent'; export default () => { + const { t } = useTranslation(['dashboard/account', 'strings']); + const [deleteIdentifier, setDeleteIdentifier] = useState(''); const [keys, setKeys] = useState([]); const [loading, setLoading] = useState(true); @@ -65,7 +68,7 @@ export default () => { {keys.length === 0 ? (

- {loading ? 'Loading...' : 'No API keys exist for this account.'} + {loading ? t('loading', { ns: 'strings' }) : 'No API keys exist for this account.'}

) : ( keys.map((key, index) => ( @@ -77,8 +80,10 @@ export default () => {

{key.description}

- Last used:  - {key.lastUsedAt ? format(key.lastUsedAt, 'MMM do, yyyy HH:mm') : 'Never'} + {t('last_used', { ns: 'strings' })}:  + {key.lastUsedAt + ? format(key.lastUsedAt, 'MMM do, yyyy HH:mm') + : t('never', { ns: 'strings' })}