import React from "react"; import Spinner from "../../icons/Spinner"; function ProgressBar({ progress, doubleUpscaylCounter, stopHandler, batchMode, }) { const [batchProgress, setBatchProgress] = React.useState(0); React.useEffect(() => { const progressString = progress.replace(/\n/g, ""); console.log({ progressString }); if (progressString.length === 5 && progressString === "0.00%") { setBatchProgress((prev) => prev + 1); } }, [progress]); return (

{batchMode && "Batch Upscale In Progress: " + batchProgress} {!batchMode && (doubleUpscaylCounter > 0 ? `${progress}\nPass ${doubleUpscaylCounter}` : `${progress}`)}

Doing the Upscayl magic...

); } export default ProgressBar;