fix: performance improvements (#2581)

This commit is contained in:
David Nguyen
2026-03-09 10:22:57 +11:00
committed by GitHub
parent abd031b58b
commit 6c8726b58c
30 changed files with 240 additions and 99 deletions
@@ -8,7 +8,8 @@ import { PDF_VIEWER_ERROR_MESSAGES } from '@documenso/lib/constants/pdf-viewer-i
import { cn } from '@documenso/ui/lib/utils';
import { Alert, AlertDescription, AlertTitle } from '@documenso/ui/primitives/alert';
import { PDFViewer, type PDFViewerProps } from './pdf-viewer';
import type { PDFViewerProps } from './pdf-viewer';
import PDFViewerLazy from './pdf-viewer-lazy';
export type EnvelopePdfViewerProps = {
/**
@@ -52,7 +53,8 @@ export const EnvelopePdfViewer = ({
}
return (
<PDFViewer
<PDFViewerLazy
key={`${currentEnvelopeItem.envelopeId}-${currentEnvelopeItem.id}`}
{...props}
className={cn('h-full w-full max-w-[800px]', className)}
data={currentEnvelopeItem.data}