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:
parent
b6665ed4b5
commit
861b5df9f4
|
@ -36,9 +36,8 @@ export default function WorkoutItem({
|
||||||
);
|
);
|
||||||
|
|
||||||
const description = useMemo(() => {
|
const description = useMemo(() => {
|
||||||
const minutes = item.minutes?.toString().padStart(2, '0');
|
|
||||||
const seconds = item.seconds?.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}`;
|
return `${item.sets}`;
|
||||||
}, [item, settings.alarm]);
|
}, [item, settings.alarm]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user