From b97d323ed1693a078d0396df3bb7c9cdd397fcd6 Mon Sep 17 00:00:00 2001 From: wewewe-ok Date: Thu, 18 Apr 2024 14:59:43 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=8D=E8=87=AA=E7=84=B6=E3=81=AB?= =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=83=9D=E3=83=BC=E3=83=8D=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=81=8C=E6=B6=88=E3=81=88=E3=82=8B=E3=81=9F=E3=82=81=E3=80=81?= =?UTF-8?q?=E5=88=B6=E5=BE=A1=E6=9D=A1=E4=BB=B6=E3=81=A7=E3=83=AC=E3=83=B3?= =?UTF-8?q?=E3=83=80=E3=83=AA=E3=83=B3=E3=82=B0=E3=81=99=E3=82=8B=E3=81=AE?= =?UTF-8?q?=E3=82=92=E3=82=84=E3=82=81=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- islands/ImageForm.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/islands/ImageForm.tsx b/islands/ImageForm.tsx index 1e5f031..be5a2d6 100644 --- a/islands/ImageForm.tsx +++ b/islands/ImageForm.tsx @@ -18,7 +18,6 @@ const createAsciiArt = async (image: File) => { export default function ImageForm() { const isActiveFileUpLoderDisable = useSignal(false); const buttonDisable = useSignal(false); - const previewUploadImage = useSignal(false); const isAnnounsing = useSignal(false); const uploadImage = (event: Event) => { @@ -47,7 +46,6 @@ export default function ImageForm() { const image = imageElement.files[0]; buttonDisable.value = true; - previewUploadImage.value = true; isAnnounsing.value = true; const asciiArtBlob = await createAsciiArt(image); @@ -58,12 +56,13 @@ export default function ImageForm() { "ascii-art" ) as HTMLImageElement; asciiArtPreview.src = blobUrl; + const preview = document.getElementById("preview") as HTMLImageElement; + preview.src = ""; }; fileData.readAsDataURL(asciiArtBlob); isActiveFileUpLoderDisable.value = false; buttonDisable.value = false; - previewUploadImage.value = false; isAnnounsing.value = false; }; return ( @@ -86,9 +85,7 @@ export default function ImageForm() { ファイルをアップロードする - {!previewUploadImage.value ? ( - - ) : undefined} + {isAnnounsing.value ? (

アスキーアートを生成中...