Spaces:
Running
Running
File size: 851 Bytes
b10d53b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | import React, { useEffect, useState } from "react";
import "./PipelineLoader.css";
const steps = [
"📡 Retrieving ",
"🧠 Analyzing ",
"🤖 Processing "
];
const PipelineLoader = () => {
const [stepIndex, setStepIndex] = useState(0);
useEffect(() => {
if (stepIndex < steps.length - 1) {
const timer = setTimeout(() => {
setStepIndex(stepIndex + 1);
}, 5000); // show each step for 2s
return () => clearTimeout(timer);
}
}, [stepIndex]);
return (
<div className="pipeline-loader">
{/* <div className="flow"></div> */}
<div className="typing-indicator">
<span className="label fade">{steps[stepIndex]}</span>
<span className="dot"></span><span className="dot"></span><span className="dot"></span>
</div>
</div>
);
};
export default PipelineLoader;
|