-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
web/app/components/base/file-uploader/dynamic-pdf-preview.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'use client' | ||
|
||
import dynamic from 'next/dynamic' | ||
|
||
type DynamicPdfPreviewProps = { | ||
url: string | ||
onCancel: () => void | ||
} | ||
const DynamicPdfPreview = dynamic<DynamicPdfPreviewProps>( | ||
(() => { | ||
if (typeof window !== 'undefined') | ||
return import('./pdf-preview') | ||
}) as any, | ||
{ ssr: false }, // This will prevent the module from being loaded on the server-side | ||
) | ||
|
||
export default DynamicPdfPreview |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.