Files
zooqueen fb4e3df0e3 rename: @hanzo/sign-* → @hanzo/esign-* (full eSign brand consistency)
The product is branded Hanzo eSign (esign.hanzo.ai, repo hanzoai/esign).
Rename all workspace packages @hanzo/sign-* → @hanzo/esign-* (1052 files)
and align docker/Dockerfile turbo --scope/--filter to the actual remix
package name @hanzo/esign (was a pre-existing mismatch with -remix that
broke the build). Protected deps (@hanzo/insights, @hanzo/logo) untouched.
2026-06-21 19:56:09 -07:00

35 lines
1.1 KiB
TypeScript

import { Trans } from '@lingui/react/macro';
import type { ImageLoadingState } from '@hanzo/esign-lib/client-only/providers/envelope-render-provider';
import { cn } from '@hanzo/esign-ui/lib/utils';
import { Spinner } from '@hanzo/esign-ui/primitives/spinner';
type PdfViewerPageImageProps = {
imageLoadingState: ImageLoadingState;
imageProps: React.ImgHTMLAttributes<HTMLImageElement> & Record<string, unknown> & { alt: '' };
};
export const PdfViewerPageImage = ({ imageLoadingState, imageProps }: PdfViewerPageImageProps) => {
return (
<>
{/* Loading State */}
{imageLoadingState === 'loading' && (
<div className="absolute inset-0 z-10 flex items-center justify-center text-muted-foreground opacity-20">
<Spinner />
</div>
)}
{imageLoadingState === 'error' && (
<div className="absolute inset-0 z-10 flex items-center justify-center">
<p>
<Trans>Error loading page</Trans>
</p>
</div>
)}
{/* The PDF image. */}
{imageProps.src && <img {...imageProps} className={cn(imageProps.className, '')} alt="" />}
</>
);
};