import React, { useEffect, useState } from "react"; export const CircularProgress = ({ progress }: { progress: number }) => { const [circumference, setCircumference] = useState(0); useEffect(() => { const radius = 40; const calcCircumference = 2 * Math.PI * radius; setCircumference(calcCircumference); }, []); const progressAngle = (progress / 100) * 360 >= 360 ? 359.9 : (progress / 100) * 360; const progressX = 50 + Math.cos((progressAngle - 90) * (Math.PI / 180)) * 40; const progressY = 50 + Math.sin((progressAngle - 90) * (Math.PI / 180)) * 40; return (