From 4fc49d5cb2c3b1e3e32cfea17cfbb7f3cd742987 Mon Sep 17 00:00:00 2001 From: Appryll Date: Tue, 3 Jun 2025 13:48:45 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BF=EF=B8=8F(frontend)=20Set=20page=20tit?= =?UTF-8?q?les=20for=20403=20and=20404=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set the page titles for the 403 and 404 error pages to improve user experience and accessibility. --- src/frontend/apps/impress/src/pages/403.tsx | 63 +++++++++++-------- src/frontend/apps/impress/src/pages/404.tsx | 67 ++++++++++++--------- 2 files changed, 78 insertions(+), 52 deletions(-) diff --git a/src/frontend/apps/impress/src/pages/403.tsx b/src/frontend/apps/impress/src/pages/403.tsx index 469d5311..dc5a0fbf 100644 --- a/src/frontend/apps/impress/src/pages/403.tsx +++ b/src/frontend/apps/impress/src/pages/403.tsx @@ -1,4 +1,5 @@ import { Button } from '@openfun/cunningham-react'; +import Head from 'next/head'; import Image from 'next/image'; import { ReactElement } from 'react'; import { useTranslation } from 'react-i18next'; @@ -17,34 +18,46 @@ const Page: NextPageWithLayout = () => { const { t } = useTranslation(); return ( - - {t('Image + <> + + + {t('Access Denied - Error 403')} - {t('Docs')} + + + + + {t('Image - - - {t('You do not have permission to view this document.')} - + + + {t('You do not have permission to view this document.')} + - - }> - {t('Home')} - - + + }> + {t('Home')} + + + - + ); }; diff --git a/src/frontend/apps/impress/src/pages/404.tsx b/src/frontend/apps/impress/src/pages/404.tsx index f66e3895..111b15e2 100644 --- a/src/frontend/apps/impress/src/pages/404.tsx +++ b/src/frontend/apps/impress/src/pages/404.tsx @@ -1,4 +1,5 @@ import { Button } from '@openfun/cunningham-react'; +import Head from 'next/head'; import Image from 'next/image'; import { ReactElement } from 'react'; import { useTranslation } from 'react-i18next'; @@ -17,36 +18,48 @@ const Page: NextPageWithLayout = () => { const { t } = useTranslation(); return ( - - {t('Image + <> + + + {t('Page Not Found - Error 404')} - {t('Docs')} + + + + + {t('Image - - - {t( - 'It seems that the page you are looking for does not exist or cannot be displayed correctly.', - )} - + + + {t( + 'It seems that the page you are looking for does not exist or cannot be displayed correctly.', + )} + - - }> - {t('Home')} - - + + }> + {t('Home')} + + + - + ); };