Skip to content

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

feat: disable banner for datarooms

Marc Seitz4644f0764280
diff --git a/components/links/link-sheet/index.tsx b/components/links/link-sheet/index.tsx
index 07a4a4a6..80750b1f 100644
--- a/components/links/link-sheet/index.tsx
+++ b/components/links/link-sheet/index.tsx
@@ -46,6 +46,7 @@ import { LinkOptions } from "./link-options";
export const DEFAULT_LINK_PROPS = (
linkType: LinkType,
groupId: string | null = null,
+ showBanner: boolean = true,
) => ({
id: null,
name: null,
@@ -71,7 +72,7 @@ export const DEFAULT_LINK_PROPS = (
questionType: null,
enableAgreement: false,
agreementId: null,
- showBanner: linkType === LinkType.DOCUMENT_LINK ? true : false,
+ showBanner: linkType === LinkType.DOCUMENT_LINK ? showBanner : false,
enableWatermark: false,
watermarkConfig: null,
audienceType: groupId ? LinkAudienceType.GROUP : LinkAudienceType.GENERAL,
@@ -141,13 +142,13 @@ export default function LinkSheet({
const { isFree, isDatarooms, isDataroomsPlus, isTrial } = usePlan();
const analytics = useAnalytics();
const [data, setData] = useState<DEFAULT_LINK_TYPE>(
- DEFAULT_LINK_PROPS(linkType, groupId),
+ DEFAULT_LINK_PROPS(linkType, groupId, !isDatarooms),
);
const [isLoading, setIsLoading] = useState<boolean>(false);
const [isSaving, setIsSaving] = useState<boolean>(false);
useEffect(() => {
- setData(currentLink || DEFAULT_LINK_PROPS(linkType, groupId));
+ setData(currentLink || DEFAULT_LINK_PROPS(linkType, groupId, !isDatarooms));
}, [currentLink]);
const handlePreviewLink = async (link: LinkWithViews) => {
diff --git a/lib/middleware/domain.ts b/lib/middleware/domain.ts
index 7c1e15ec..f9bf3901 100644
--- a/lib/middleware/domain.ts
+++ b/lib/middleware/domain.ts
@@ -8,6 +8,12 @@ export default async function DomainMiddleware(req: NextRequest) {
// If it's the root path, redirect to papermark.com/home
if (path === "/") {
+ if (host === "guide.permithealth.com") {
+ return NextResponse.redirect(
+ new URL("https://guide.permithealth.com/faq", req.url),
+ );
+ }
+
return NextResponse.redirect(
new URL("https://www.papermark.com/home", req.url),
);