fix: Reading stats UI (#2322)
* part1 fix: reading days show duration * part2 fix: Fix time formatting in favorite days chart --------- Co-authored-by: WorldTeacher <coding_contact@pm.me>
This commit is contained in:
co-authored by
WorldTeacher
parent
ecdb58c11f
commit
6338ed13fc
+2
-2
@@ -90,8 +90,8 @@ export class FavoriteDaysChartComponent implements OnInit, OnDestroy {
|
||||
if (label === 'Sessions') {
|
||||
return `${label}: ${value} session${value !== 1 ? 's' : ''}`;
|
||||
} else {
|
||||
const hours = Math.floor(value / 3600);
|
||||
const minutes = Math.floor((value % 3600) / 60);
|
||||
const hours = Math.floor(value);
|
||||
const minutes = Math.floor((value % 1) * 60);
|
||||
return `${label}: ${hours}h ${minutes}m`;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user