From e6bfe51f30df6d8d7c14912a52dbe6db4b0b086f Mon Sep 17 00:00:00 2001 From: leonliu06 Date: Mon, 4 Mar 2024 12:41:00 +0800 Subject: [PATCH] Fix: Don't need to encode tags when production --- app/tags/[tag]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/tags/[tag]/page.tsx b/app/tags/[tag]/page.tsx index d2cab3f965..4e491b5290 100644 --- a/app/tags/[tag]/page.tsx +++ b/app/tags/[tag]/page.tsx @@ -25,7 +25,7 @@ export const generateStaticParams = async () => { const tagCounts = tagData as Record const tagKeys = Object.keys(tagCounts) const paths = tagKeys.map((tag) => ({ - tag: encodeURI(tag), + tag: process.env.NODE_ENV === 'production' ? tag : encodeURI(tag), })) return paths }