Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix: dataroom folder rename

Marc Seitz2a7fb05b3ccd
diff --git a/components/documents/folder-card.tsx b/components/documents/folder-card.tsx
index 4b612d33..0966178c 100644
--- a/components/documents/folder-card.tsx
+++ b/components/documents/folder-card.tsx
@@ -251,7 +251,13 @@ export default function FolderCard({
</DropdownMenuTrigger>
<DropdownMenuContent align="end" ref={dropdownRef}>
<DropdownMenuLabel>Actions</DropdownMenuLabel>
- <DropdownMenuItem onClick={() => setOpenFolder(true)}>
+ <DropdownMenuItem
+ onClick={(e) => {
+ e.preventDefault();
+ e.stopPropagation();
+ setOpenFolder(true);
+ }}
+ >
Rename
</DropdownMenuItem>
{!isDataroom ? (
diff --git a/components/folders/add-folder-modal.tsx b/components/folders/add-folder-modal.tsx
index ab72c144..9f2d6005 100644
--- a/components/folders/add-folder-modal.tsx
+++ b/components/folders/add-folder-modal.tsx
@@ -46,7 +46,7 @@ export function AddFolderModal({
const [open, setOpen] = useState<boolean>(false);
const teamInfo = useTeam();
- const { plan } = usePlan();
+ const { plan, trial } = usePlan();
const analytics = useAnalytics();
/** current folder name */
@@ -107,7 +107,7 @@ export function AddFolderModal({
};
// If the team is on a free plan, show the upgrade modal
- if (plan === "free") {
+ if (plan === "free" && (!isDataroom || !trial)) {
if (children) {
return (
<UpgradePlanModal clickedPlan="Pro" trigger={"add_folder_button"}>