fix: Public Link of pending members is now disabled (#9730)

pull/9733/head^2
Anit Jha 2023-06-23 14:23:00 +05:30 committed by GitHub
parent efe18ebdcd
commit 0eb05aa540
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import classNames from "classnames";
import { signIn } from "next-auth/react";
import { useState } from "react";
import { WEBAPP_URL } from "@calcom/lib/constants";
@ -173,6 +174,7 @@ export default function MemberListItem(props: Props) {
className={classNames(!editMode ? "rounded-r-md" : "")}
variant="icon"
StartIcon={ExternalLink}
disabled={!props.member.accepted}
/>
</Tooltip>
{editMode && (
@ -227,7 +229,12 @@ export default function MemberListItem(props: Props) {
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem className="outline-none">
<DropdownItem type="button" StartIcon={ExternalLink}>
<DropdownItem
disabled={!props.member.accepted}
href={!props.member.accepted?undefined : "/" + props.member.username}
target="_blank"
type="button"
StartIcon={ExternalLink}>
{t("view_public_page")}
</DropdownItem>
</DropdownMenuItem>