Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
fix(links): show correct links for dataroom
Marc Seitz33977a60a5d1
diff --git a/components/links/links-table.tsx b/components/links/links-table.tsxindex a1bc2484..4a7fff1a 100644--- a/components/links/links-table.tsx+++ b/components/links/links-table.tsx@@ -200,7 +200,7 @@ export default function LinksTable({<div className="whitespace-nowrap w-full flex text-xs md:text-sm group-hover/cell:opacity-0">{link.domainId? `https://${link.domainSlug}/${link.slug}`- : `https://${process.env.NEXT_PUBLIC_ROOT_DOMAIN}/view/${link.id}`}+ : `https://${process.env.NEXT_PUBLIC_ROOT_DOMAIN}/view/${targetType === "DATAROOM" ? `d/` : ``}${link.id}`}</div>{link.domainId && hasFreePlan ? (@@ -220,7 +220,7 @@ export default function LinksTable({handleCopyToClipboard(link.domainId? `https://${link.domainSlug}/${link.slug}`- : `https://${process.env.NEXT_PUBLIC_ROOT_DOMAIN}/view/${link.id}`,+ : `https://${process.env.NEXT_PUBLIC_ROOT_DOMAIN}/view/${targetType === "DATAROOM" ? `d/` : ``}${link.id}`,)}title="Copy to clipboard"@@ -243,7 +243,8 @@ export default function LinksTable({<TableCell><CollapsibleTriggerdisabled={- Number(nFormatter(link._count.views)) === 0+ Number(nFormatter(link._count.views)) === 0 ||+ targetType === "DATAROOM"}><div className="flex items-center space-x-1 [&[data-state=open]>svg.chevron]:rotate-180">@@ -254,7 +255,8 @@ export default function LinksTable({views</span></p>- {Number(nFormatter(link._count.views)) > 0 ? (+ {Number(nFormatter(link._count.views)) > 0 &&+ targetType !== "DATAROOM" ? (<ChevronDown className="h-4 w-4 text-muted-foreground shrink-0 transition-transform duration-200 chevron" />) : null}</div>