mirror of
https://github.com/lumina-rocks/lumina.git
synced 2026-04-09 23:16:47 +02:00
40 lines
834 B
TypeScript
40 lines
834 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(
|
|
(
|
|
// ImageResponse JSX element
|
|
<div
|
|
style={{
|
|
fontSize: 24,
|
|
background: 'black',
|
|
width: '100%',
|
|
height: '100%',
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
color: 'white',
|
|
}}
|
|
>
|
|
L
|
|
</div>
|
|
),
|
|
// ImageResponse options
|
|
{
|
|
// For convenience, we can re-use the exported icons size metadata
|
|
// config to also set the ImageResponse's width and height.
|
|
...size,
|
|
}
|
|
)
|
|
} |