diff --git a/frontend/bun.lockb b/frontend/bun.lockb index 61279ec..3e04e77 100755 Binary files a/frontend/bun.lockb and b/frontend/bun.lockb differ diff --git a/frontend/src/components/DownloadForm.js b/frontend/src/components/DownloadForm.js index 99fc7c2..bffa6f9 100644 --- a/frontend/src/components/DownloadForm.js +++ b/frontend/src/components/DownloadForm.js @@ -58,18 +58,13 @@ const DownloadForm = () => { return "bg-blue-500"; // Default color when not processing }; - const getBarStyle = () => { - if (message === "Download complete" || message === "Download failed") { - return { transition: "width 0.5s ease-in-out" }; - } - return { transition: "width 0.5s ease-in-out" }; - }; + const getBarStyle = () => ({ + transition: "width 0.5s ease-in-out", + }); const getAnimationStyle = () => { - if (message === "Download complete" || message === "Download failed") { - return { animation: "none" }; - } - return { animation: "loading 1.5s infinite" }; + // Hide the loading animation when progress is greater than 0 + return progress === 0 ? { animation: "loading 1.5s infinite" } : {}; }; useEffect(() => { @@ -136,7 +131,7 @@ const DownloadForm = () => { ...getBarStyle(), }} > - {isProcessing && ( + {isProcessing && progress === 0 && (