export const formatTime = (time: number) => {
  const minutes = Math.floor(time / 60);
  const seconds = Math.floor(time - minutes * 60);
  const formatted = [minutes, seconds].map((n) => `${n < 10 ? '0' : ''}${n}`).join(':');

  return formatted;
};
