Some checks failed
Tick / tick (push) Failing after 1s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 lines
411 B
TypeScript
11 lines
411 B
TypeScript
import { ImageResponse } from "next/og";
|
|
import { IconArt } from "@/lib/icon-art";
|
|
|
|
const SIZES = new Set([192, 512]);
|
|
|
|
export async function GET(_req: Request, ctx: RouteContext<"/pwa-icon/[size]">) {
|
|
const size = Number((await ctx.params).size);
|
|
if (!SIZES.has(size)) return new Response("Not found", { status: 404 });
|
|
return new ImageResponse(<IconArt size={size} />, { width: size, height: size });
|
|
}
|