Files
buzz-sheet/app/[character]/page.tsx
T
gunshiz 0a643dd60e
CI / Verify (push) Successful in 57s
CI / Build immutable images and deploy (push) Successful in 1m39s
feat : update
2026-08-30 10:26:42 +00:00

32 lines
874 B
TypeScript

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