From 6243adb477ca80359c50578295999e7956d3fe57 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Tue, 1 Jul 2025 13:36:32 -0700 Subject: fix: redirection url path parameter for main feed --- middleware/src/app/[gameName]/page.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'middleware/src/app') diff --git a/middleware/src/app/[gameName]/page.tsx b/middleware/src/app/[gameName]/page.tsx index d4e7b51..10e8b40 100644 --- a/middleware/src/app/[gameName]/page.tsx +++ b/middleware/src/app/[gameName]/page.tsx @@ -85,11 +85,14 @@ export default async function GamePage({ if (postId && mainNewsUrl && !ua.isBot) { const { redirect } = await import("next/navigation"); + if(gameName === "news"){ + redirect(`${mainNewsUrl}/#${postId}`); + } redirect(`${mainNewsUrl}/game/${gameName}#${postId}`); } const redirectUrl = - postId && mainNewsUrl ? `${mainNewsUrl}/game/${gameName}#${postId}` : mainNewsUrl; + postId && mainNewsUrl ? (gameName === "news" ? `${mainNewsUrl}/#${postId}` : `${mainNewsUrl}/game/${gameName}#${postId}`) : mainNewsUrl; return (
-- cgit v1.2.3