♿️(frontend) Set page titles for 403 and 404 errors
Set the page titles for the 403 and 404 error pages to improve user experience and accessibility.
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { Button } from '@openfun/cunningham-react';
|
import { Button } from '@openfun/cunningham-react';
|
||||||
|
import Head from 'next/head';
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import { ReactElement } from 'react';
|
import { ReactElement } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
@@ -17,6 +18,17 @@ const Page: NextPageWithLayout = () => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>
|
||||||
|
{t('Access Denied - Error 403')} - {t('Docs')}
|
||||||
|
</title>
|
||||||
|
<meta
|
||||||
|
property="og:title"
|
||||||
|
content={`${t('Access Denied - Error 403')} - ${t('Docs')}`}
|
||||||
|
key="title"
|
||||||
|
/>
|
||||||
|
</Head>
|
||||||
<Box
|
<Box
|
||||||
$align="center"
|
$align="center"
|
||||||
$margin="auto"
|
$margin="auto"
|
||||||
@@ -45,6 +57,7 @@ const Page: NextPageWithLayout = () => {
|
|||||||
</StyledLink>
|
</StyledLink>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { Button } from '@openfun/cunningham-react';
|
import { Button } from '@openfun/cunningham-react';
|
||||||
|
import Head from 'next/head';
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import { ReactElement } from 'react';
|
import { ReactElement } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
@@ -17,6 +18,17 @@ const Page: NextPageWithLayout = () => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>
|
||||||
|
{t('Page Not Found - Error 404')} - {t('Docs')}
|
||||||
|
</title>
|
||||||
|
<meta
|
||||||
|
property="og:title"
|
||||||
|
content={`${t('Page Not Found - Error 404')} - ${t('Docs')}`}
|
||||||
|
key="title"
|
||||||
|
/>
|
||||||
|
</Head>
|
||||||
<Box
|
<Box
|
||||||
$align="center"
|
$align="center"
|
||||||
$margin="auto"
|
$margin="auto"
|
||||||
@@ -47,6 +59,7 @@ const Page: NextPageWithLayout = () => {
|
|||||||
</StyledLink>
|
</StyledLink>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user