

export  const calculatePercentages = (times) => {
    const total = times?.reduce((acc, time) => acc + time, 0);
    const percentages = times?.map(time => !time ? 0 : ((time / total) * 100).toFixed(2));

    return percentages
  };
   
export default calculatePercentages
   
