mirror of
https://github.com/langgenius/dify.git
synced 2026-07-21 18:58:35 +08:00
17 lines
399 B
TypeScript
17 lines
399 B
TypeScript
'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
|