diff --git a/frontend/src/helpers/time/period.ts b/frontend/src/helpers/time/period.ts index 0e56eaa5c..94a44a682 100644 --- a/frontend/src/helpers/time/period.ts +++ b/frontend/src/helpers/time/period.ts @@ -19,6 +19,13 @@ export function secondsToPeriod(seconds: number): { unit: PeriodUnit, amount: nu } } + if (seconds % SECONDS_A_MINUTE === 0) { + return { + unit: 'minutes', + amount: seconds / SECONDS_A_MINUTE, + } + } + return { unit: 'hours', amount: seconds / SECONDS_A_HOUR,