Skip to content

Commit

Permalink
feat: 👽 AT-22: Add i18n translations for the 'coming soon', 'page loa…
Browse files Browse the repository at this point in the history
…ding' & 'page not found' pages.
  • Loading branch information
Kene-Okoye committed Mar 12, 2024
1 parent fffdde6 commit 34db52f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/pages/comingSoon/ComingSoon.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@
color: var(--carrot-orange-color);
text-decoration: underline;
margin-block-start: var(--spacing-sm) !important;
width: -moz-fit-content;
width: fit-content;
}
8 changes: 4 additions & 4 deletions src/pages/comingSoon/ComingSoon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ import instagramLogo from '@/assets/svg/instagram_logo_orange.svg';
import linkedInLogo from '@/assets/svg/linkedin_logo_orange.svg';

function ComingSoon() {
const { i18n } = useTranslation();
const { i18n, t } = useTranslation();
const currentLanguage: LanguageType = i18n.resolvedLanguage as LanguageType;

return (
<>
<div className={comingSoonStyles['coming-soon--hero-section-wrapper']}>
<HeroSection
h1Text="Coming soon"
pText="We‘re currently working on this page. Stay tuned for some exciting updates"
h1Text={`${t('coming_soon')}`}
pText={`${t('coming_soon_elaboration_text')}`}
backGroundImage={heroImageComingSoon}
>
<Link
className={comingSoonStyles['coming-soon--link']}
to={`/${paths[currentLanguage].HOME}`}
>
Return to the home page
{t('return_to_homepage')}
</Link>

<div className={comingSoonStyles['coming-soon--icon-wrapper']}>
Expand Down
6 changes: 5 additions & 1 deletion src/pages/pageLoading/PageLoading.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { useTranslation } from 'react-i18next';

import pageLoadingStyles from '@/pages/pageLoading/PageLoading.module.css';

const PageLoading = () => {
const { t } = useTranslation();

return (
<div className={pageLoadingStyles['page-loading']}>
<div className={pageLoadingStyles['page-loading--container']}>
<p>Page is loading</p>
<p>{t('page_is_loading')}</p>
<div className={pageLoadingStyles['page-loading--loading-line']}></div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/pageNotFound/PageNotFound.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import paths from '@/routes/paths';
import pageNotFoundStyles from '@/pages/pageNotFound/PageNotFound.module.css';

const PageNotFound = () => {
const { i18n } = useTranslation();
const { i18n, t } = useTranslation();
const currentLanguage: LanguageType = i18n.resolvedLanguage as LanguageType;

return (
<div className={pageNotFoundStyles['page-not-found']}>
<div className={pageNotFoundStyles['page-not-found--content-wrapper']}>
<p>404: The page you requested could not be found.</p>
<Link to={`/${paths[currentLanguage].HOME}`}>Return to the Home Page</Link>
<p>{t('page_not_found')}</p>
<Link to={`/${paths[currentLanguage].HOME}`}>{t('return_to_homepage')}</Link>
</div>
</div>
);
Expand Down

0 comments on commit 34db52f

Please sign in to comment.