Skip to content

Commit

Permalink
revert head seo changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hbjORbj committed Dec 28, 2024
1 parent 13ad5dd commit a55294c
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions packages/ui/components/head-seo/HeadSeo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type { NextSeoProps } from "next-seo";
import { NextSeo } from "next-seo";
import { usePathname } from "next/navigation";

import type { AppImageProps } from "@calcom/lib/OgImages";
import { constructAppImage, constructGenericImage } from "@calcom/lib/OgImages";
import type { AppImageProps, MeetingImageProps } from "@calcom/lib/OgImages";
import { constructAppImage, constructGenericImage, constructMeetingImage } from "@calcom/lib/OgImages";
import { APP_NAME, CAL_URL } from "@calcom/lib/constants";
import { buildCanonical, getSeoImage, seoConfig } from "@calcom/lib/next-seo.config";
import { truncateOnWord } from "@calcom/lib/text";
Expand All @@ -16,6 +16,7 @@ export type HeadSeoProps = {
canonical?: string;
nextSeoProps?: NextSeoProps;
app?: AppImageProps;
meeting?: MeetingImageProps;
isBrandingHidden?: boolean;
origin?: string;
};
Expand Down Expand Up @@ -82,6 +83,7 @@ export const HeadSeo = (props: HeadSeoProps): JSX.Element => {
canonical = defaultUrl,
nextSeoProps = {},
app,
meeting,
isBrandingHidden,
} = props;

Expand All @@ -96,6 +98,17 @@ export const HeadSeo = (props: HeadSeoProps): JSX.Element => {
siteName,
});

if (meeting) {
const pageImage = getSeoImage("ogImage") + constructMeetingImage(meeting);
seoObject = buildSeoMeta({
title: pageTitle,
description: truncatedDescription,
image: pageImage,
canonical,
siteName,
});
}

if (app) {
const pageImage =
getSeoImage("ogImage") + constructAppImage({ ...app, description: truncatedDescription });
Expand Down

0 comments on commit a55294c

Please sign in to comment.