Skip to content

Commit

Permalink
Create route.tsx
Browse files Browse the repository at this point in the history
Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com>
  • Loading branch information
gitworkflows authored Apr 11, 2024
1 parent cd4e002 commit 0cf9807
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions solutions/blog/app/og/route.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { ImageResponse } from 'next/og'

export function GET(request: Request) {
let url = new URL(request.url)
let title = url.searchParams.get('title') || 'Next.js Portfolio Starter'

return new ImageResponse(
(
<div tw="flex flex-col w-full h-full items-center justify-center bg-white">
<div tw="flex flex-col md:flex-row w-full py-12 px-4 md:items-center justify-between p-8">
<h2 tw="flex flex-col text-4xl font-bold tracking-tight text-left">
{title}
</h2>
</div>
</div>
),
{
width: 1200,
height: 630,
}
)
}

1 comment on commit 0cf9807

@vercel
Copy link

@vercel vercel bot commented on 0cf9807 Apr 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hand-pickr – ./

hand-pickr-devsec.vercel.app
hand-pickr-git-main-devsec.vercel.app
hand-pickr.vercel.app

Please sign in to comment.