From bf761fe4d6144159a79547aee80c8cbc152108e8 Mon Sep 17 00:00:00 2001 From: TechQuery Date: Fri, 2 Aug 2024 01:49:48 +0800 Subject: [PATCH] [add] custom 404 page for NGO [optimize] update Upstream packages --- README.md | 3 + components/NotFoundCard.tsx | 14 + package.json | 18 +- pages/_error.tsx | 26 +- pnpm-lock.yaml | 1806 +++++++++++++++++------------------ styles/globals.less | 7 + 6 files changed, 951 insertions(+), 923 deletions(-) create mode 100644 components/NotFoundCard.tsx diff --git a/README.md b/README.md index e0d3e69..d3daf87 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,9 @@ 2. [Editor components](pages/component.tsx) 3. [Pagination table](pages/pagination.tsx) 4. [Scroll list](pages/scroll-list.tsx) +5. [Not Found page (NGO)](pages/_error.tsx) + - Global: https://notfound.org/ + - Chinese: https://www.dnpw.org/cn/pa-notfound.html ## Best practice diff --git a/components/NotFoundCard.tsx b/components/NotFoundCard.tsx new file mode 100644 index 0000000..e944a66 --- /dev/null +++ b/components/NotFoundCard.tsx @@ -0,0 +1,14 @@ +import { FC } from 'react'; + +import { i18n } from '../models/Translation'; + +export const NotFoundCard: FC = () => + i18n.currentLanguage.startsWith('zh') ? ( + // @ts-ignore +