diff --git a/src/app/api/og/dashboard/route.tsx b/src/app/api/og/dashboard/route.tsx index 9705107..c1537cb 100644 --- a/src/app/api/og/dashboard/route.tsx +++ b/src/app/api/og/dashboard/route.tsx @@ -18,6 +18,11 @@ export async function GET(req: NextRequest) { const target = searchParams.get('target') || 'JEE'; const plan = searchParams.get('plan') || 'Free'; + // Build absolute URL for the logo + const protocol = req.headers.get('x-forwarded-proto') || 'http'; + const host = req.headers.get('host') || 'localhost:3000'; + const logoUrl = `${protocol}://${host}/PragatiVeer_Logo/PNG_Logos/Rectangular_dark_background.png`; + return new ImageResponse( (
{/* Header */}
-
-
- PRAGATIVEER -
-
+ +
Performance Overview
{/* Main Content */}
-

Dashboard Stats

- {/* 2x2 Grid */} -
-
- {score} - Today's Score +
+
+ {score} + Today's Score
-
- {accuracy} - Accuracy +
+ {accuracy} + Accuracy
-
- {qs} - Qs Attempted +
+ {qs} + Qs Attempted
-
- {rank} - City Rank +
+ {rank} + City Rank
@@ -73,19 +73,19 @@ export async function GET(req: NextRequest) { {/* Footer */}
-
{name}
-
{`${plan} Plan`}
-
{`${target} Aspirant`}
+
{name}
+
{`${plan} Plan`}
+
{`${target} Aspirant`}
-
+
contact@pragativeer.com
), { - width: 1200, - height: 630, + width: 1080, + height: 1080, } ); } catch (e: any) {