Files
buzz-sheet/app/[character]/opengraph-image.tsx
T
gunshiz 206d305cb0
CI / Verify (push) Successful in 57s
CI / Build immutable images and deploy (push) Successful in 1m39s
x
2026-08-31 01:45:45 +07:00

23 lines
651 B
TypeScript

import { connection } from "next/server";
import { getCachedPublicGuide } from "@/lib/cache/public";
import {
generateOgImage,
ogImageContentType,
ogImageSize,
} from "@/lib/og-image";
export const alt = "Buzz Guide character guide";
export const size = ogImageSize;
export const contentType = ogImageContentType;
export default async function Image({
params,
}: {
params: Promise<{ character: string }>;
}) {
await connection();
const guide = await getCachedPublicGuide((await params).character);
if (!guide) return new Response("Not found", { status: 404 });
return generateOgImage({ title: guide.name, sub: guide.overview });
}