From 7848a3cc8ed5366e762b8d51ae54043f36fd81ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=ED=98=84=EC=A1=B0?= Date: Tue, 8 Oct 2024 09:52:00 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=EC=97=85=EB=A1=9C=EB=93=9C=20=ED=8D=BC?= =?UTF-8?q?=EC=84=BC=ED=8A=B8=20=EB=B3=B5=EA=B5=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/ImagePreSignedForm/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/ImagePreSignedForm/index.tsx b/frontend/src/components/ImagePreSignedForm/index.tsx index 4705f6a..daace94 100644 --- a/frontend/src/components/ImagePreSignedForm/index.tsx +++ b/frontend/src/components/ImagePreSignedForm/index.tsx @@ -148,8 +148,7 @@ export default function ImagePreSignedForm({ onProgress: (progress) => { setUploadStatus((prevStatus) => { const completedFiles = Math.round((progress / 100) * files.length); - const newStatus = prevStatus.map((status, index) => (index < completedFiles ? 'success' : status)); - return newStatus; + return prevStatus.map((status, index) => (index < completedFiles ? 'success' : status)); }); }, useSingleUpload: uploadType === 'file', @@ -166,7 +165,7 @@ export default function ImagePreSignedForm({ } }; - const totalProgress = Math.round((uploadStatus.filter((status) => status !== null).length / files.length) * 100); + const totalProgress = Math.round((uploadStatus.filter((status) => status === 'success').length / files.length) * 100); useEffect(() => { onFileCount(files.length);