feat : update
This commit is contained in:
@@ -7,13 +7,23 @@ import { getPublicGuide } from "@/lib/guides/queries";
|
||||
|
||||
type Params = Promise<{ character: string }>;
|
||||
|
||||
export async function generateMetadata({ params }: { params: Params }): Promise<Metadata> {
|
||||
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" };
|
||||
return guide
|
||||
? { title: `${guide.name} Build Guide`, description: guide.overview }
|
||||
: { title: "ไม่พบ Guide" };
|
||||
}
|
||||
|
||||
export default async function GuideOverviewPage({ params }: { params: Params }) {
|
||||
export default async function GuideOverviewPage({
|
||||
params,
|
||||
}: {
|
||||
params: Params;
|
||||
}) {
|
||||
await connection();
|
||||
const guide = await getPublicGuide((await params).character);
|
||||
if (!guide) notFound();
|
||||
|
||||
Reference in New Issue
Block a user