+
+
+
+
+
+
+
+
+ {file.name}
+
+
{fileSize(file.size)}
+
+
+
+
+
+ );
+}
+
+function Body({ shown }: { shown: Shown }) {
+ const t = useT().files.preview;
+ switch (shown.kind) {
+ case "loading":
+ return (
+
+
+ {shown.gone ? t.gone : shown.tooBig ? t.tooBig : t.failed}
+
+ {!shown.gone && !shown.tooBig && (
+
{shown.detail}
+ )}
+
+ );
+ case "image":
+ return (
+