Files
buzz-sheet/app/[character]/page.tsx
T
gunshiz 9a3672dab3
CI / Verify (push) Successful in 1m14s
CI / Build immutable images and deploy (push) Failing after 57s
perf : improve via lighthouse
2026-09-08 18:11:15 +07:00

31 lines
829 B
TypeScript

import type { Metadata } from "next";
import { notFound } from "next/navigation";
import { StructuredGuideShell } from "@/components/public/structured-guide";
import { getCachedPublicGuide } from "@/lib/cache/public";
type Params = Promise<{ character: string }>;
export const instant = false;
export async function generateMetadata({
params,
}: {
params: Params;
}): Promise<Metadata> {
const guide = await getCachedPublicGuide((await params).character);
return guide
? { title: `${guide.name}`, description: guide.overview }
: { title: "ไม่พบไกด์" };
}
export default async function GuideOverviewPage({
params,
}: {
params: Params;
}) {
const guide = await getCachedPublicGuide((await params).character);
if (!guide) notFound();
return <StructuredGuideShell guide={guide} />;
}