Open History to see the last commit
1import { lazy, Suspense } from "react";
2
3import { FileSurfaceLoading } from "./fileSurfaceChrome";
4
5const PreviewImageContent = lazy(() => import("./PreviewImageContent"));
6
7export function PreviewImage(props: {
8 readonly src: string;
9 readonly name: string;
10 readonly mimeType?: string;
11 readonly onError?: () => void;
12}) {
13 return (
14 <Suspense fallback={<FileSurfaceLoading />}>
15 <PreviewImageContent {...props} />
16 </Suspense>
17 );
18}