From 6c21f7c71cc127dfb09f7f6829ef84cb55598d54 Mon Sep 17 00:00:00 2001 From: Rohittomar01 Date: Tue, 16 Apr 2024 13:12:46 +0530 Subject: [PATCH] applied org logo --- src/app/api/og/route.tsx | 71 ++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 31 deletions(-) diff --git a/src/app/api/og/route.tsx b/src/app/api/og/route.tsx index 44277ff2..8b9f3291 100644 --- a/src/app/api/og/route.tsx +++ b/src/app/api/og/route.tsx @@ -1,5 +1,5 @@ import { ImageResponse } from "next/og"; - +import logo from "@/assets/logo.png"; // App router includes @vercel/og. // No need to install it. @@ -45,7 +45,8 @@ export async function GET(request: Request) { const urlParams = new URLSearchParams(request.url.split("?")[1]); // Splitting URL to get query params const title = urlParams.get("title"); console.log("title", title); - console.log("request.url", request.url); + console.log("request.url", request.url, logo); + // const { searchParams } = new URL(request.url); // console.log("searchParams", searchParams); // const hasTitle = searchParams.has("title"); @@ -55,7 +56,6 @@ export async function GET(request: Request) { return new ImageResponse( ( - // Main Design Component
-

- {title ? title : " The Dual Role of Tween 80 in Biofilm Formation"} -

-

- Inhibition and Enhancement -

+

+ {title + ? title + : " The Dual Role of Tween 80 in Biofilm Formation"} +

+

+ Inhibition and Enhancement +

+
- {/* */} - + + {/* */}