39 lines
924 B
TypeScript
39 lines
924 B
TypeScript
import { ImageResponse } from "next/og";
|
|
|
|
// Route segment config
|
|
export const runtime = "edge";
|
|
|
|
// Image metadata
|
|
export const size = {
|
|
width: 32,
|
|
height: 32
|
|
};
|
|
export const contentType = "image/png";
|
|
|
|
// Image generation
|
|
export default function Icon() {
|
|
return new ImageResponse(
|
|
(
|
|
<div
|
|
style={{
|
|
fontSize: 20,
|
|
background: "linear-gradient(135deg, #10b981 0%, #059669 100%)",
|
|
width: "100%",
|
|
height: "100%",
|
|
display: "flex",
|
|
alignItems: "center",
|
|
justifyContent: "center",
|
|
color: "white",
|
|
borderRadius: "8px", // Rounded square
|
|
fontWeight: 800,
|
|
}}
|
|
>
|
|
O
|
|
</div>
|
|
),
|
|
{
|
|
...size
|
|
}
|
|
);
|
|
}
|