Skip to content

Commit 6b4de52

Browse files
committed
Dynamically switch between two bases
1 parent 5d5cb85 commit 6b4de52

File tree

4 files changed

+2
-1
lines changed

4 files changed

+2
-1
lines changed
-59.3 KB
Binary file not shown.
137 KB
Loading
144 KB
Loading

apps/web-roo-code/src/app/api/og/route.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ export async function GET(request: NextRequest) {
3535
// Dynamically get the base URL from the current request
3636
// This ensures it works correctly in development, preview, and production environments
3737
const baseUrl = `${requestUrl.protocol}//${requestUrl.host}`
38-
const backgroundUrl = `${baseUrl}/og/base.png`
38+
const variant = title.length % 2 === 0 ? "a" : "b"
39+
const backgroundUrl = `${baseUrl}/og/base_${variant}.png`
3940

4041
return new ImageResponse(
4142
(

0 commit comments

Comments
 (0)