import * as React from 'react'; import LinearProgress from '@mui/joy/LinearProgress'; import Typography from '@mui/joy/Typography'; import Box from '@mui/joy/Box'; export default function LinearProgressWithLabel() { const [progress, setProgress] = React.useState(0); React.useEffect(() => { const timer = setInterval(() => { setProgress((prevProgress) => (prevProgress >= 100 ? 0 : prevProgress + 10)); }, 800); return () => { clearInterval(timer); }; }, []); return ( LOADING… {`${Math.round(progress)}%`} ); }