You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dynamic-pdf-preview.tsx 403B

1234567891011121314151617
  1. 'use client'
  2. import dynamic from 'next/dynamic'
  3. type DynamicPdfPreviewProps = {
  4. url: string
  5. onCancel: () => void
  6. }
  7. const DynamicPdfPreview = dynamic<DynamicPdfPreviewProps>(
  8. (() => {
  9. if (typeof window !== 'undefined')
  10. return import('./pdf-preview')
  11. }) as any,
  12. { ssr: false }, // This will prevent the module from being loaded on the server-side
  13. )
  14. export default DynamicPdfPreview