From b55cf4929a8856e093df076281343674b6047216 Mon Sep 17 00:00:00 2001 From: liuweiqing Date: Tue, 20 Feb 2024 09:59:48 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=A7=BB=E5=8A=A8=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/{ => [lng]}/sentry-example-page/page.jsx | 0 app/global-error.jsx | 19 ------------------- app/{[lng] => }/opengraph-image.png | Bin app/{[lng] => }/twitter-image.png | Bin middleware.ts | 2 +- 5 files changed, 1 insertion(+), 20 deletions(-) rename app/{ => [lng]}/sentry-example-page/page.jsx (100%) delete mode 100644 app/global-error.jsx rename app/{[lng] => }/opengraph-image.png (100%) rename app/{[lng] => }/twitter-image.png (100%) diff --git a/app/sentry-example-page/page.jsx b/app/[lng]/sentry-example-page/page.jsx similarity index 100% rename from app/sentry-example-page/page.jsx rename to app/[lng]/sentry-example-page/page.jsx diff --git a/app/global-error.jsx b/app/global-error.jsx deleted file mode 100644 index 2e6130a..0000000 --- a/app/global-error.jsx +++ /dev/null @@ -1,19 +0,0 @@ -"use client"; - -import * as Sentry from "@sentry/nextjs"; -import Error from "next/error"; -import { useEffect } from "react"; - -export default function GlobalError({ error }) { - useEffect(() => { - Sentry.captureException(error); - }, [error]); - - return ( - - - - - - ); -} diff --git a/app/[lng]/opengraph-image.png b/app/opengraph-image.png similarity index 100% rename from app/[lng]/opengraph-image.png rename to app/opengraph-image.png diff --git a/app/[lng]/twitter-image.png b/app/twitter-image.png similarity index 100% rename from app/[lng]/twitter-image.png rename to app/twitter-image.png diff --git a/middleware.ts b/middleware.ts index 27687c7..171cb37 100644 --- a/middleware.ts +++ b/middleware.ts @@ -69,6 +69,6 @@ export const config = { * - favicon.ico (favicon file) * Feel free to modify this pattern to include more paths. */ - "/((?!_next/static|_next/image|favicon.ico).*)", + "/((?!_next/static|_next/image|favicon.ico|twitter-image.png|opengraph-image.png).*)", ], };