Fix landing locale toggle cache path

This commit is contained in:
2569718930@qq.com
2026-06-14 05:11:37 +08:00
parent b4a23578f2
commit 0084235b57
5 changed files with 38 additions and 12 deletions
+4 -1
View File
@@ -1,6 +1,7 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";
import { InstitutionalLandingPage } from "@/components/landing/InstitutionalLandingPage";
import { LANDING_LOCALE_QUERY_PARAM } from "@/components/landing/landingLocale";
export const metadata: Metadata = {
title: "PolyWeather | Institutional Weather Signal Intelligence",
@@ -32,6 +33,8 @@ export default async function HomePage({
const qs = usp.toString();
redirect(`/auth/callback${qs ? `?${qs}` : ""}`);
}
const rawLandingLocale = params[LANDING_LOCALE_QUERY_PARAM];
const landingLocale = Array.isArray(rawLandingLocale) ? rawLandingLocale[0] : rawLandingLocale;
const jsonLd = {
"@context": "https://schema.org",
"@type": "WebApplication",
@@ -68,7 +71,7 @@ export default async function HomePage({
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
/>
<InstitutionalLandingPage />
<InstitutionalLandingPage queryLocale={landingLocale} />
</>
);
}