From a838dfff447df6c305b9bddf575f9d8496632e8e Mon Sep 17 00:00:00 2001 From: Rizky Date: Mon, 11 Mar 2024 18:46:58 +0700 Subject: [PATCH] wip fix --- app/web/src/nova/ed/panel/side/prop-instance/prop-file.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/web/src/nova/ed/panel/side/prop-instance/prop-file.tsx b/app/web/src/nova/ed/panel/side/prop-instance/prop-file.tsx index d523bfc8..f75433a0 100644 --- a/app/web/src/nova/ed/panel/side/prop-instance/prop-file.tsx +++ b/app/web/src/nova/ed/panel/side/prop-instance/prop-file.tsx @@ -74,7 +74,8 @@ export const EdPropInstanceFile: FC<{ const Preview: FC<{ filename: string }> = ({ filename }) => { const p = useGlobal(EDGlobal, "EDITOR"); - const is_image = isImage(filename.split(".").pop() || ""); + const ext = filename.split(".").pop() || ""; + const is_image = isImage(ext); return (
{is_image && ( @@ -85,6 +86,9 @@ const Preview: FC<{ filename: string }> = ({ filename }) => { className={cx("w-[20px] h-[20px] border mr-1")} /> )} + {!is_image && ( +
{ext}
+ )} Browse File
);