perf : improve via lighthouse
CI / Verify (push) Successful in 1m14s
CI / Build immutable images and deploy (push) Failing after 57s

This commit is contained in:
2026-09-08 18:11:15 +07:00 Unverified
parent 63b1ec6629
commit 9a3672dab3
10 changed files with 11999 additions and 40 deletions
-3
View File
@@ -1,6 +1,5 @@
import type { Metadata } from "next";
import { notFound } from "next/navigation";
import { connection } from "next/server";
import { publicSections, StructuredGuideShell } from "@/components/public/structured-guide";
import { getCachedPublicGuide } from "@/lib/cache/public";
@@ -10,14 +9,12 @@ type Params = Promise<{ character: string; page: string }>;
export const instant = false;
export async function generateMetadata({ params }: { params: Params }): Promise<Metadata> {
await connection();
const { character } = await params;
const guide = await getCachedPublicGuide(character);
return guide ? { title: `${guide.name}`, description: guide.overview } : { title: "ไม่พบไกด์" };
}
export default async function GuideSectionPage({ params }: { params: Params }) {
await connection();
const { character, page } = await params;
const guide = await getCachedPublicGuide(character);
if (!guide || !publicSections(guide).some((section) => section.slug === page)) notFound();