Remove extra padding from workouts rest timers

Typically rest timers don't have double digit minutes.
This doesn't prevent that, but will save space 99% of the time,
and in the odd situation where a rest duration is >9 minutes
will be slightly uneven.
This commit is contained in:
Brandon Presley 2022-10-14 16:57:08 +13:00
parent b6665ed4b5
commit 861b5df9f4
1 changed files with 1 additions and 2 deletions

View File

@ -36,9 +36,8 @@ export default function WorkoutItem({
);
const description = useMemo(() => {
const minutes = item.minutes?.toString().padStart(2, '0');
const seconds = item.seconds?.toString().padStart(2, '0');
if (settings.alarm) return `${item.sets} x ${minutes}:${seconds}`;
if (settings.alarm) return `${item.sets} x ${item.minutes || 0}:${seconds}`;
return `${item.sets}`;
}, [item, settings.alarm]);