+
+
+ {q.data.truncated
+ ? t("files.preview.truncated", {
+ size: formatBytes(file.asset?.size_bytes, i18n.language),
+ })
+ : t("files.preview.asText")}
+
+ setWrap(!wrap)}
+ >
+
+
+
+
+
+ {lines.map((line, i) => (
+ -
+
+ {i + 1}
+
+
+ {line || " "}
+
+
+ ))}
+
+
+
+ );
+}
+
+function NoPreview({ file }: { file: LibraryFile }) {
+ const { t, i18n } = useTranslation();
+ const size = file.asset?.size_bytes;
+ return (
+