diff --git a/resources/scripts/components/dashboard/DashboardContainer.tsx b/resources/scripts/components/dashboard/DashboardContainer.tsx index 3d54f47..effdbd9 100644 --- a/resources/scripts/components/dashboard/DashboardContainer.tsx +++ b/resources/scripts/components/dashboard/DashboardContainer.tsx @@ -13,11 +13,14 @@ import useSWR from 'swr'; import { PaginatedResult } from '@/api/http'; import Pagination from '@/components/elements/Pagination'; import { useLocation } from 'react-router-dom'; +import { useTranslation } from 'react-i18next'; import BeforeContent from '@/blueprint/components/Dashboard/BeforeContent'; import AfterContent from '@/blueprint/components/Dashboard/AfterContent'; export default () => { + const { t } = useTranslation('dashboard/index'); + const { search } = useLocation(); const defaultPage = Number(new URLSearchParams(search).get('page') || '1'); @@ -52,12 +55,12 @@ export default () => { }, [error]); return ( - + {rootAdmin && (

- {showOnlyAdmin ? "Showing others' servers" : 'Showing your servers'} + {showOnlyAdmin ? t('showing-others-servers') : t('showing-your-servers')}

{ )) ) : (

- {showOnlyAdmin - ? 'There are no other servers to display.' - : 'There are no servers associated with your account.'} + {showOnlyAdmin ? t('no-other-servers') : t('no-servers-associated')}

) } @@ -88,4 +89,4 @@ export default () => { ); -}; +}; \ No newline at end of file