show the link only if there's a username (#8238)

pull/8240/head
GitStart-Cal.com 2023-04-13 07:04:52 +00:00 committed by GitHub
parent 9d3963436b
commit 86e903ce4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ export default function MemberListItem(props: Props) {
process.env.NEXT_PUBLIC_TEAM_IMPERSONATION === "true";
const urlWithoutProtocol = WEBAPP_URL.replace(/^https?:\/\//, "");
const bookingLink = `${urlWithoutProtocol}/${props.member.username}`;
const bookingLink = !!props.member.username && `${urlWithoutProtocol}/${props.member.username}`;
return (
<li className="divide-subtle divide-y px-5">