Scheduling infrastructure for absolutely everyone.
Fixes broken avatar slug link in availability page : OG image (#3255)
Syed Ali Shahbazff6a7bf2a6d7
diff --git a/apps/web/components/booking/pages/AvailabilityPage.tsx b/apps/web/components/booking/pages/AvailabilityPage.tsxindex d8b39c67eec..8010f2565f5 100644--- a/apps/web/components/booking/pages/AvailabilityPage.tsx+++ b/apps/web/components/booking/pages/AvailabilityPage.tsx@@ -366,6 +366,9 @@ const AvailabilityPage = ({ profile, eventType }: Props) => {),[timeZone]);+ const rawSlug = profile.slug ? profile.slug.split("/") : [];+ if (rawSlug.length > 1) rawSlug.pop(); //team events have team name as slug, but user events have [user]/[type] as slug.+ const slug = rawSlug.join("/");return (<>@@ -374,7 +377,7 @@ const AvailabilityPage = ({ profile, eventType }: Props) => {title={`${rescheduleUid ? t("reschedule") : ""} ${eventType.title} | ${profile.name}`}description={`${rescheduleUid ? t("reschedule") : ""} ${eventType.title}`}name={profile.name || undefined}- username={profile.slug || undefined}+ username={slug || undefined}/><CustomBranding lightVal={profile.brandColor} darkVal={profile.darkBrandColor} /><div>