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