I am trying to animate over 60 seconds and here's what I have so far:
export default function TimeLoader({ timeout }: ITimeLoaderProps) {
const [progress, setProgress] = useState(1);
useInterval(() => {
setProgress(p => Math.min(p * 1.1, 100));
}, 100);
console.log({ progress });
return (
<LinearProgress variant="determinate" value={progress} />
);
}
But obviously this isn't done over 60 seconds. It finishes rather quick. If I increase the timeout time from 100 to something else, then it's a bit jerky.
Thanks SO!