From 3c056ba096aa1dc4e27daf3fd6117b9c1e2bb076 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Wed, 16 Mar 2022 09:33:27 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4404=EF=BC=8C=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/404.js | 16 ---------------- pages/[slug].js | 3 +-- pages/article/[slug].js | 3 +-- pages/page/[page].js | 3 +-- 4 files changed, 3 insertions(+), 22 deletions(-) delete mode 100644 pages/404.js diff --git a/pages/404.js b/pages/404.js deleted file mode 100644 index 1c3a2a6d..00000000 --- a/pages/404.js +++ /dev/null @@ -1,16 +0,0 @@ -import { useGlobal } from '@/lib/global' -import * as ThemeMap from '@/themes' - -/** - * 自定义404界面 - * @returns {JSX.Element} - * @constructor - */ - -const Custom404 = (props) => { - const { theme } = useGlobal() - const ThemeComponents = ThemeMap[theme] - return -} - -export default Custom404 diff --git a/pages/[slug].js b/pages/[slug].js index 5b1a6412..92cffdef 100644 --- a/pages/[slug].js +++ b/pages/[slug].js @@ -2,7 +2,6 @@ import BLOG from '@/blog.config' import { getPostBlocks } from '@/lib/notion' import { getGlobalNotionData } from '@/lib/notion/getNotionData' import { useGlobal } from '@/lib/global' -import Custom404 from './404' import * as ThemeMap from '@/themes' /** @@ -14,7 +13,7 @@ const Slug = (props) => { const { theme } = useGlobal() const ThemeComponents = ThemeMap[theme] if (!props.post) { - return + return } return } diff --git a/pages/article/[slug].js b/pages/article/[slug].js index bfe391d1..9eb1bd65 100644 --- a/pages/article/[slug].js +++ b/pages/article/[slug].js @@ -2,7 +2,6 @@ import BLOG from '@/blog.config' import { getPostBlocks } from '@/lib/notion' import { getGlobalNotionData } from '@/lib/notion/getNotionData' import { useGlobal } from '@/lib/global' -import Custom404 from '../404' import * as ThemeMap from '@/themes' /** @@ -14,7 +13,7 @@ const Slug = (props) => { const { theme } = useGlobal() const ThemeComponents = ThemeMap[theme] if (!props.post) { - return + return } return } diff --git a/pages/page/[page].js b/pages/page/[page].js index 0d6c1759..0149f12d 100644 --- a/pages/page/[page].js +++ b/pages/page/[page].js @@ -2,14 +2,13 @@ import BLOG from '@/blog.config' import { getPostBlocks } from '@/lib/notion' import { getGlobalNotionData } from '@/lib/notion/getNotionData' import { useGlobal } from '@/lib/global' -import Custom404 from '../404' import * as ThemeMap from '@/themes' const Page = (props) => { const { theme } = useGlobal() const ThemeComponents = ThemeMap[theme] if (!props?.meta) { - return + return } return }