dify/web/app/components/base/file-uploader/dynamic-pdf-preview.tsx
Stephen Zhou a84c2d36a3
style: format with vp fmt (#38803)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-12 15:57:46 +00:00

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