diff --git a/apps/web/app/org/[orgSlug]/[user]/[type]/page.tsx b/apps/web/app/org/[orgSlug]/[user]/[type]/page.tsx index 48d621d737cac3..c33365e31e7817 100644 --- a/apps/web/app/org/[orgSlug]/[user]/[type]/page.tsx +++ b/apps/web/app/org/[orgSlug]/[user]/[type]/page.tsx @@ -6,7 +6,7 @@ import { cookies, headers } from "next/headers"; import { getOrgFullOrigin } from "@calcom/features/ee/organizations/lib/orgDomains"; -import { buildLegacyCtx } from "@lib/buildLegacyCtx"; +import { buildLegacyCtx, decodeParams } from "@lib/buildLegacyCtx"; import { getServerSideProps } from "@lib/org/[orgSlug]/[user]/[type]/getServerSideProps"; import type { PageProps as TeamTypePageProps } from "~/team/type-view"; @@ -37,12 +37,14 @@ export const generateMetadata = async ({ params, searchParams }: PageProps) => { })), ], }; + const decodedParams = decodeParams(params); const metadata = await generateMeetingMetadata( meeting, (t) => `${rescheduleUid && !!booking ? t("reschedule") : ""} ${title} | ${profileName}`, (t) => `${rescheduleUid ? t("reschedule") : ""} ${title}`, isBrandingHidden, - getOrgFullOrigin(eventData?.entity.orgSlug ?? null) + getOrgFullOrigin(eventData?.entity.orgSlug ?? null), + `/${decodedParams.user}/${decodedParams.type}` ); return { diff --git a/apps/web/app/org/[orgSlug]/[user]/page.tsx b/apps/web/app/org/[orgSlug]/[user]/page.tsx index 519b2c2aaa7e57..ec1baeceb864cc 100644 --- a/apps/web/app/org/[orgSlug]/[user]/page.tsx +++ b/apps/web/app/org/[orgSlug]/[user]/page.tsx @@ -7,7 +7,7 @@ import { cookies, headers } from "next/headers"; import { getOrgFullOrigin } from "@calcom/features/ee/organizations/lib/orgDomains"; import { getOrgOrTeamAvatar } from "@calcom/lib/defaultAvatarImage"; -import { buildLegacyCtx } from "@lib/buildLegacyCtx"; +import { buildLegacyCtx, decodeParams } from "@lib/buildLegacyCtx"; import { getServerSideProps } from "@lib/org/[orgSlug]/[user]/getServerSideProps"; import type { PageProps as TeamPageProps } from "~/team/team-view"; @@ -31,14 +31,15 @@ export const generateMetadata = async ({ params, searchParams }: PageProps) => { image: getOrgOrTeamAvatar(team), }, }; - + const decodedParams = decodeParams(params); return { ...(await generateMeetingMetadata( meeting, (t) => team.name ?? t("nameless_team"), (t) => team.name ?? t("nameless_team"), false, - getOrgFullOrigin(currentOrgDomain ?? null) + getOrgFullOrigin(currentOrgDomain ?? null), + `/${decodedParams.user}` )), robots: { index: isSEOIndexable, diff --git a/apps/web/app/org/[orgSlug]/instant-meeting/team/[slug]/[type]/page.tsx b/apps/web/app/org/[orgSlug]/instant-meeting/team/[slug]/[type]/page.tsx index df2662740d64e1..3b9354b90028bf 100644 --- a/apps/web/app/org/[orgSlug]/instant-meeting/team/[slug]/[type]/page.tsx +++ b/apps/web/app/org/[orgSlug]/instant-meeting/team/[slug]/[type]/page.tsx @@ -6,7 +6,7 @@ import { headers, cookies } from "next/headers"; import { getOrgFullOrigin } from "@calcom/features/ee/organizations/lib/orgDomains"; -import { buildLegacyCtx } from "@lib/buildLegacyCtx"; +import { buildLegacyCtx, decodeParams } from "@lib/buildLegacyCtx"; import { getServerSideProps } from "@lib/org/[orgSlug]/instant-meeting/team/[slug]/[type]/getServerSideProps"; import type { Props } from "~/org/[orgSlug]/instant-meeting/team/[slug]/[type]/instant-meeting-view"; @@ -30,12 +30,14 @@ export const generateMetadata = async ({ params, searchParams }: _PageProps) => })), ], }; + const decodedParams = decodeParams(params); const metadata = await generateMeetingMetadata( meeting, () => `${title} | ${profileName}`, () => `${title}`, isBrandingHidden, - getOrgFullOrigin(eventData?.entity.orgSlug ?? null) + getOrgFullOrigin(eventData?.entity.orgSlug ?? null), + `/instant-meeting/team/${decodedParams.slug}/${decodedParams.type}` ); return { diff --git a/apps/web/app/team/[slug]/[type]/page.tsx b/apps/web/app/team/[slug]/[type]/page.tsx index 25815f8bfcd517..56bc0ef9fcce25 100644 --- a/apps/web/app/team/[slug]/[type]/page.tsx +++ b/apps/web/app/team/[slug]/[type]/page.tsx @@ -6,7 +6,7 @@ import { cookies, headers } from "next/headers"; import { getOrgFullOrigin } from "@calcom/features/ee/organizations/lib/orgDomains"; -import { buildLegacyCtx } from "@lib/buildLegacyCtx"; +import { buildLegacyCtx, decodeParams } from "@lib/buildLegacyCtx"; import { getServerSideProps } from "@lib/team/[slug]/[type]/getServerSideProps"; import LegacyPage from "~/team/type-view"; @@ -30,13 +30,14 @@ export const generateMetadata = async ({ params, searchParams }: PageProps) => { })), ], }; - + const decodedParams = decodeParams(params); const metadata = await generateMeetingMetadata( meeting, (t) => `${booking?.uid && !!booking ? t("reschedule") : ""} ${title} | ${profileName}`, (t) => `${booking?.uid ? t("reschedule") : ""} ${title}`, isBrandingHidden, - getOrgFullOrigin(eventData.entity.orgSlug ?? null) + getOrgFullOrigin(eventData.entity.orgSlug ?? null), + `/team/${decodedParams.slug}/${decodedParams.type}` ); return { diff --git a/apps/web/app/team/[slug]/page.tsx b/apps/web/app/team/[slug]/page.tsx index cba4c5d3a70ca1..a4e3eaffc6b852 100644 --- a/apps/web/app/team/[slug]/page.tsx +++ b/apps/web/app/team/[slug]/page.tsx @@ -7,7 +7,7 @@ import { cookies, headers } from "next/headers"; import { getOrgFullOrigin } from "@calcom/features/ee/organizations/lib/orgDomains"; import { getOrgOrTeamAvatar } from "@calcom/lib/defaultAvatarImage"; -import { buildLegacyCtx } from "@lib/buildLegacyCtx"; +import { buildLegacyCtx, decodeParams } from "@lib/buildLegacyCtx"; import { getServerSideProps } from "@lib/team/[slug]/getServerSideProps"; import type { PageProps } from "~/team/team-view"; @@ -25,13 +25,14 @@ export const generateMetadata = async ({ params, searchParams }: _PageProps) => image: getOrgOrTeamAvatar(team), }, }; - + const decodedParams = decodeParams(params); const metadata = await generateMeetingMetadata( meeting, (t) => team.name || t("nameless_team"), (t) => team.name || t("nameless_team"), false, - getOrgFullOrigin(currentOrgDomain ?? null) + getOrgFullOrigin(currentOrgDomain ?? null), + `/team/${decodedParams.slug}` ); return { ...metadata, diff --git a/apps/web/middleware.ts b/apps/web/middleware.ts index f09d4b1c6c51ab..beb83ebd973140 100644 --- a/apps/web/middleware.ts +++ b/apps/web/middleware.ts @@ -170,8 +170,6 @@ export const config = { "/booking/:path*", "/payment/:path*", "/routing-forms/:path*", - "/team/:path*", - "/org/:path*", ], };