Fixes broken avatar slug link in availability page : OG image (#3255)
* fixed broken avatar slug link * alternate fix Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Peer Richelsen
kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
parent
0433b0a69a
commit
ff6a7bf2a6
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user