diff --git a/src/app/events/[id]/page.jsx b/src/app/events/[id]/page.jsx index 6bf18340..5f987c01 100644 --- a/src/app/events/[id]/page.jsx +++ b/src/app/events/[id]/page.jsx @@ -2,11 +2,10 @@ import { getClient } from "gql/client"; import { GET_EVENT } from "gql/queries/events"; import { redirect } from "next/navigation"; -import { getFile } from "utils/files"; -import { getPlaceholder } from "utils/placeholder"; +import { getFile, PUBLIC_URL } from "utils/files"; import EventDetails from "components/events/EventDetails"; -export async function generateMetadata({ params }, parent) { +export async function generateMetadata({ params }) { const { id } = params; try { @@ -14,8 +13,8 @@ export async function generateMetadata({ params }, parent) { eventid: id, }); const img = event.poster - ? getFile(event.poster) - : getPlaceholder({ seed: event.name, w: 2000, h: 2000 }); + ? getFile(event.poster, true) + : `${PUBLIC_URL}/og-image.png`; return { title: event.name, diff --git a/src/app/layout.jsx b/src/app/layout.jsx index 8e7aed9c..892b630d 100644 --- a/src/app/layout.jsx +++ b/src/app/layout.jsx @@ -11,6 +11,7 @@ import { AuthProvider } from "components/AuthProvider"; import { fontClass } from "components/ThemeRegistry/typography"; import TransitionProvider from "components/TransitionProvider"; import { headers } from "next/headers"; +import { PUBLIC_URL } from "utils/files"; const description = "Discover the vibrant campus life at IIIT Hyderabad through the Clubs Council. Explore diverse student-led clubs, and events that foster an inclusive community and enrich student experiences beyond the classroom. Stay updated on activities, events, and opportunities to engage and grow at IIIT-H."; @@ -44,7 +45,7 @@ export const metadata = { description: shortDescription, images: [ { - url: "https://clubs.iiit.ac.in/og-image.png", + url: `${PUBLIC_URL}/og-image.png`, width: 1200, height: 630, alt: "Clubs Council", diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index 3ce9f23a..88852451 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -151,7 +151,7 @@ export default function Footer() {