From fe37ecaea150d5ecb9a1a6df4b7ea988db2fe881 Mon Sep 17 00:00:00 2001 From: Cyril Date: Wed, 15 Jul 2026 16:13:32 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8(frontend)=20update=20404,=20500=20?= =?UTF-8?q?and=20generic=20error=20pages=20to=20new=20error=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wire new SVG icons and show Home plus Refresh actions on error pages. --- .../assets/icons/{error-404.svg => 404.svg} | 152 ++++++++--------- .../apps/impress/src/assets/icons/500.svg | 157 ++++++++++++++++++ .../impress/src/assets/icons/error-500.svg | 142 ---------------- src/frontend/apps/impress/src/pages/404.tsx | 80 ++------- src/frontend/apps/impress/src/pages/500.tsx | 6 +- .../apps/impress/src/pages/_error.tsx | 5 +- 6 files changed, 250 insertions(+), 292 deletions(-) rename src/frontend/apps/impress/src/assets/icons/{error-404.svg => 404.svg} (51%) create mode 100644 src/frontend/apps/impress/src/assets/icons/500.svg delete mode 100644 src/frontend/apps/impress/src/assets/icons/error-500.svg diff --git a/src/frontend/apps/impress/src/assets/icons/error-404.svg b/src/frontend/apps/impress/src/assets/icons/404.svg similarity index 51% rename from src/frontend/apps/impress/src/assets/icons/error-404.svg rename to src/frontend/apps/impress/src/assets/icons/404.svg index 17597f6af..d923a0e05 100644 --- a/src/frontend/apps/impress/src/assets/icons/error-404.svg +++ b/src/frontend/apps/impress/src/assets/icons/404.svg @@ -1,57 +1,57 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - - - - - - - - + + + + + + + + + + + - - - + + + - + - + @@ -60,95 +60,95 @@ - + - - + + - - + + - + - - + + - - + + - + - - + + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + diff --git a/src/frontend/apps/impress/src/assets/icons/500.svg b/src/frontend/apps/impress/src/assets/icons/500.svg new file mode 100644 index 000000000..aee910b78 --- /dev/null +++ b/src/frontend/apps/impress/src/assets/icons/500.svg @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/frontend/apps/impress/src/assets/icons/error-500.svg b/src/frontend/apps/impress/src/assets/icons/error-500.svg deleted file mode 100644 index 74acfd849..000000000 --- a/src/frontend/apps/impress/src/assets/icons/error-500.svg +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/frontend/apps/impress/src/pages/404.tsx b/src/frontend/apps/impress/src/pages/404.tsx index ade6ec72d..f4d807728 100644 --- a/src/frontend/apps/impress/src/pages/404.tsx +++ b/src/frontend/apps/impress/src/pages/404.tsx @@ -1,83 +1,23 @@ -import { Button } from '@gouvfr-lasuite/cunningham-react'; -import Head from 'next/head'; -import Image from 'next/image'; import { ReactElement } from 'react'; import { useTranslation } from 'react-i18next'; -import styled from 'styled-components'; -import error_img from '@/assets/icons/error-planetes.png'; -import { Box, Icon, StyledLink, Text } from '@/components'; +import Error404Svg from '@/assets/icons/404.svg'; +import { ErrorPage } from '@/components'; import { PageLayout } from '@/layouts'; import { NextPageWithLayout } from '@/types/next'; -const StyledButton = styled(Button)` - width: fit-content; -`; - const Page: NextPageWithLayout = () => { const { t } = useTranslation(); return ( - <> - - - {t('Page Not Found - Error 404')} - {t('Docs')} - - - - - - {t('Page Not Found - Error 404')} - {t('Docs')} - - - - - {t( - 'It seems that the page you are looking for does not exist or cannot be displayed correctly.', - )} - - - - - - } - > - {t('Home')} - - - - - + ); }; diff --git a/src/frontend/apps/impress/src/pages/500.tsx b/src/frontend/apps/impress/src/pages/500.tsx index f69f2ede1..e81a00546 100644 --- a/src/frontend/apps/impress/src/pages/500.tsx +++ b/src/frontend/apps/impress/src/pages/500.tsx @@ -2,7 +2,7 @@ import { useRouter } from 'next/router'; import { ReactElement } from 'react'; import { useTranslation } from 'react-i18next'; -import error_img from '@/assets/icons/error-coffee.png'; +import Error500Svg from '@/assets/icons/500.svg'; import { ErrorPage } from '@/components'; import { PageLayout } from '@/layouts'; import { NextPageWithLayout } from '@/types/next'; @@ -16,11 +16,13 @@ const Page: NextPageWithLayout = () => { return ( ); }; diff --git a/src/frontend/apps/impress/src/pages/_error.tsx b/src/frontend/apps/impress/src/pages/_error.tsx index e06bfc324..4689e61e5 100644 --- a/src/frontend/apps/impress/src/pages/_error.tsx +++ b/src/frontend/apps/impress/src/pages/_error.tsx @@ -4,7 +4,7 @@ import NextError from 'next/error'; import { ReactElement } from 'react'; import { useTranslation } from 'react-i18next'; -import error_img from '@/assets/icons/error-planetes.png'; +import Error500Svg from '@/assets/icons/500.svg'; import { ErrorPage } from '@/components'; import { PageLayout } from '@/layouts'; @@ -13,7 +13,8 @@ const Error = () => { return (