From 4afe7a29b143a1ffe4d053140f6f0e75189f56a0 Mon Sep 17 00:00:00 2001 From: "Apple\\Apple" Date: Tue, 20 May 2025 02:33:38 +0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8FRefactor:=20NotFound=20Page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/i18n/locales/en.json | 3 ++- web/src/pages/NotFound/index.js | 24 +++++++++++++++--------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/web/src/i18n/locales/en.json b/web/src/i18n/locales/en.json index ca0ffd8e..8aa67a5d 100644 --- a/web/src/i18n/locales/en.json +++ b/web/src/i18n/locales/en.json @@ -1388,5 +1388,6 @@ "基于New API的项目": "Projects Based on New API", "版权所有": "All rights reserved", "设计与开发由": "Designed & Developed with love by", - "演示站点": "Demo Site" + "演示站点": "Demo Site", + "页面未找到,请检查您的浏览器地址是否正确": "Page not found, please check if your browser address is correct" } \ No newline at end of file diff --git a/web/src/pages/NotFound/index.js b/web/src/pages/NotFound/index.js index f92dbc90..65b36e2c 100644 --- a/web/src/pages/NotFound/index.js +++ b/web/src/pages/NotFound/index.js @@ -1,13 +1,19 @@ import React from 'react'; -import { Message } from 'semantic-ui-react'; +import { Empty } from '@douyinfe/semi-ui'; +import { IllustrationNotFound, IllustrationNotFoundDark } from '@douyinfe/semi-illustrations'; +import { useTranslation } from 'react-i18next'; -const NotFound = () => ( - <> - - 页面不存在 -

请检查你的浏览器地址是否正确

-
- -); +const NotFound = () => { + const { t } = useTranslation(); + return ( +
+ } + darkModeImage={} + description={t('页面未找到,请检查您的浏览器地址是否正确')} + /> +
+ ); +}; export default NotFound;