Skip to content

Commit 7b56525

Browse files
committed
Merge branch 'main' into cursor/update-link-agreement-to-show-compliance-text-7d7a
2 parents 6240cd3 + 0740a4e commit 7b56525

9 files changed

Lines changed: 397 additions & 390 deletions

File tree

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Supported Versions
44

5-
All versions of Papermark are currently being supported with security updates.
5+
The latest version of Papermark is currently being supported with security updates.
66

77
## Reporting a Vulnerability
88

components/search-box.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,15 @@ export function SearchBoxPersisted({
137137
currentQuery[urlParam] = debouncedValue;
138138
}
139139

140+
// For custom domains, preserve the clean URL structure
141+
const isCustomDomain = !!(router.query.domain && router.query.slug);
142+
140143
router.push(
141144
{
142145
pathname: router.pathname,
143146
query: currentQuery,
144147
},
145-
undefined,
148+
isCustomDomain ? `/${router.query.slug}` : undefined, // Preserve custom domain URL
146149
{ shallow: true },
147150
);
148151
}, [debouncedValue]);
@@ -164,4 +167,4 @@ export function SearchBoxPersisted({
164167
{...props}
165168
/>
166169
);
167-
}
170+
}

components/view/document-view.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { ExtendedRecordMap } from "notion-types";
99
import { toast } from "sonner";
1010

1111
import { useAnalytics } from "@/lib/analytics";
12+
import { useDisablePrint } from "@/lib/hooks/use-disable-print";
1213
import { LinkWithDocument, NotionTheme, WatermarkConfig } from "@/lib/types";
1314

1415
import LoadingSpinner from "@/components/ui/loading-spinner";
@@ -19,7 +20,6 @@ import AccessForm, {
1920

2021
import EmailVerificationMessage from "./access-form/email-verification-form";
2122
import ViewData, { TViewDocumentData } from "./view-data";
22-
import { useDisablePrint } from "@/lib/hooks/use-disable-print";
2323

2424
type RowData = { [key: string]: any };
2525
type SheetData = {

components/view/viewer/dataroom-viewer.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useSearchParams } from "next/navigation";
1+
import { useRouter } from "next/router";
22

33
import { useMemo } from "react";
44
import React from "react";
@@ -157,8 +157,8 @@ export default function DataroomViewer({
157157
allowBulkDownload: boolean;
158158
};
159159

160-
const searchParams = useSearchParams();
161-
const searchQuery = searchParams?.get("search")?.toLowerCase() || "";
160+
const router = useRouter();
161+
const searchQuery = (router.query.search as string)?.toLowerCase() || "";
162162

163163
const breadcrumbFolders = useMemo(
164164
() => getParentFolders(folderId, folders),

components/view/viewer/image-viewer.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
import { useRouter } from "next/router";
22

3-
4-
53
import { useEffect, useRef, useState } from "react";
64
import React from "react";
75

8-
9-
106
import { useSafePageViewTracker } from "@/lib/tracking/safe-page-view-tracker";
117
import { getTrackingOptions } from "@/lib/tracking/tracking-config";
128
import { WatermarkConfig } from "@/lib/types";
@@ -371,4 +367,4 @@ export default function ImageViewer({
371367
/>
372368
</>
373369
);
374-
}
370+
}

0 commit comments

Comments
 (0)