
import { Box, CircularProgress, Typography } from “@mui/material”; import moment from “moment”; import { useState, useRef, useEffect } from “react”; const CircularProgressBar = (props) => { const initialTime = 10; // in seconds const [timeLeft, setTimeLeft] = useState(initialTime); const [progressBarPercent, setProgressBarPercent] = useState(0); const timerId = useRef(); useEffect(() => { if (initialTime) { timerId.current = … [Read more…]