FIX-CALCOM-8009 (#8097)

Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com>
pull/8101/head
GitStart-Cal.com 2023-04-05 09:54:25 +00:00 committed by GitHub
parent cefe4754c7
commit f10ff18d9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -93,7 +93,8 @@ export default function MemberListItem(props: Props) {
props.member.accepted &&
process.env.NEXT_PUBLIC_TEAM_IMPERSONATION === "true";
const bookingLink = `${WEBAPP_URL.split("http://")[1]}/${props.member.username}`;
const urlWithoutProtocol = WEBAPP_URL.replace(/^https?:\/\//, "");
const bookingLink = `${urlWithoutProtocol}/${props.member.username}`;
return (
<li className="divide-y px-5">
@ -124,7 +125,12 @@ export default function MemberListItem(props: Props) {
{bookingLink && (
<>
<span className="mx-2 block text-gray-600"></span>
<span className="block text-sm text-gray-600">{bookingLink}</span>
<a
target="_blank"
href={`${WEBAPP_URL}/${props.member.username}`}
className="block text-sm text-gray-600">
{bookingLink}
</a>
</>
)}
</div>