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

This commit is contained in:
GitStart-Cal.com
2023-04-13 07:04:52 +00:00
committed by GitHub
parent 9d3963436b
commit 86e903ce4a
@@ -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">