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