From a4ae811d24ab4491a7a6abfae20b26d919073ab8 Mon Sep 17 00:00:00 2001 From: Ephraim Atta-Duncan Date: Wed, 14 Feb 2024 13:06:04 +0000 Subject: [PATCH] chore: use default recipient present --- .../(dashboard)/documents/data-table-action-dropdown.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx b/apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx index 5288660a3..9f27b8fc9 100644 --- a/apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx +++ b/apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx @@ -55,18 +55,14 @@ export const DataTableActionDropdown = ({ row }: DataTableActionDropdownProps) = } const recipient = row.Recipient.find((recipient) => recipient.email === session.user.email); - const isOwner = row.User.id === session.user.id; - const isOwnerARecipient = row.Recipient.some( - (recipient) => recipient.email === session.user.email, - ); // const isRecipient = !!recipient; const isDraft = row.status === DocumentStatus.DRAFT; // const isPending = row.status === DocumentStatus.PENDING; const isComplete = row.status === DocumentStatus.COMPLETED; // const isSigned = recipient?.signingStatus === SigningStatus.SIGNED; - const isDocumentDeletable = isOwner && !isOwnerARecipient; + const isDocumentDeletable = isOwner && !recipient; const onDownloadClick = async () => { try {