feat: ask for splash image url

This commit is contained in:
lucas-neynar
2025-03-13 14:07:55 -07:00
parent 853c63e024
commit 3186cb7fc8
9 changed files with 29 additions and 226 deletions

View File

@@ -3,6 +3,7 @@ import { join } from 'path';
export async function GET() {
const appUrl = process.env.NEXT_PUBLIC_URL;
const splashImageUrl = process.env.NEXT_PUBLIC_FRAME_SPLASH_IMAGE_URL || `${appUrl}/splash.png`;
let accountAssociation; // TODO: add type
try {
@@ -22,8 +23,8 @@ export async function GET() {
iconUrl: `${appUrl}/icon.png`,
homeUrl: appUrl,
imageUrl: `${appUrl}/frames/hello/opengraph-image`,
buttonTitle: "Launch Frame",
splashImageUrl: `${appUrl}/splash.png`,
buttonTitle: process.env.NEXT_PUBLIC_FRAME_BUTTON_TEXT || "Launch Frame",
splashImageUrl,
splashBackgroundColor: "#f7f7f7",
webhookUrl: `${appUrl}/api/webhook`,
},