export interface IProgressBar { total: number; done: number; } export const ProgressBar = ({ total = 0, done = 0 }: IProgressBar) => { const calPercentage = (doneValue: number, totalValue: number): string => { if (doneValue === 0 || totalValue === 0) return (0).toFixed(0); return ((100 * doneValue) / totalValue).toFixed(0); }; return (