Fix time display on splatnet gear
Some checks failed
Build frontend / build (20.x) (push) Has been cancelled
Deploy / deploy-frontend (push) Has been cancelled
Deploy / deploy-backend (push) Has been cancelled
Fix code styles / build (push) Has been cancelled

This commit is contained in:
Matt Isenhower 2024-12-14 23:33:00 -08:00
parent 6dc7fd0bdb
commit 67e6737ccb

View File

@ -73,11 +73,13 @@ export function formatShortDurationFromNow(value) {
export function formatDurationHours(value) {
const { t } = useI18n();
let { negative, days, hours } = getDurationParts(value);
let { negative, days, hours, minutes } = getDurationParts(value);
hours += 24 * days;
return t('time.hours', { n: `${negative}${hours}` }, hours);
return hours
? t('time.hours', { n: `${negative}${hours}` }, hours)
: t('time.minutes', { n: `${negative}${minutes}` }, minutes);
}
export function formatDurationHoursFromNow(value) {