From eda118dae9bc897bcf0f3303a5e66408ed683a73 Mon Sep 17 00:00:00 2001 From: iCrawl Date: Sun, 16 Apr 2023 17:42:05 +0200 Subject: [PATCH] fix(guide): optimize redirects on middleware level --- apps/guide/src/app/guide/page.tsx | 4 +--- apps/guide/src/middleware.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/guide/src/app/guide/page.tsx b/apps/guide/src/app/guide/page.tsx index 647661f3f..bdbbeff5d 100644 --- a/apps/guide/src/app/guide/page.tsx +++ b/apps/guide/src/app/guide/page.tsx @@ -1,5 +1,3 @@ -import { redirect } from 'next/navigation'; - export default function Page() { - redirect('/guide/home/introduction'); + return null; } diff --git a/apps/guide/src/middleware.ts b/apps/guide/src/middleware.ts index 13e907828..afa3eb307 100644 --- a/apps/guide/src/middleware.ts +++ b/apps/guide/src/middleware.ts @@ -5,5 +5,5 @@ export default async function middleware(request: NextRequest) { } export const config = { - matcher: ['/'], + matcher: ['/', '/guide'], };