Skip to content

Commit

Permalink
update toast
Browse files Browse the repository at this point in the history
  • Loading branch information
AshishViradiya153 committed Oct 28, 2024
1 parent 5663e4f commit 151ec6f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions components/documents/add-document-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ export function AddDocumentModal({
}

if (!canAddDocuments) {
toast.error("You have reached the maximum number of documents.");
toast.error(
!!visitorId
? "This dataroom reached the maximum number of documents upload limit."
: "You have reached the maximum number of documents.",
);
return;
}

Expand Down Expand Up @@ -280,7 +284,11 @@ export function AddDocumentModal({
event.preventDefault();

if (!canAddDocuments) {
toast.error("You have reached the maximum number of documents.");
toast.error(
!!visitorId
? "This dataroom reached the maximum number of documents upload limit."
: "You have reached the maximum number of documents.",
);
return;
}

Expand Down Expand Up @@ -388,7 +396,7 @@ export function AddDocumentModal({
setAddDocumentModalOpen && setAddDocumentModalOpen(!isOpen);
};

if (!canAddDocuments && children) {
if (!canAddDocuments && children && !visitorId) {
if (newVersion) {
return (
<UpgradePlanModal
Expand Down

0 comments on commit 151ec6f

Please sign in to comment.