We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 703f920 commit d33c459Copy full SHA for d33c459
src/components/userLookup.tsx
@@ -507,8 +507,18 @@ const UserPlaytime = (props: { id: number }) => {
507
508
if (!playtimeData) return "Loading...";
509
510
+ const totalMinutes: number = playtimeData.reduce(
511
+ (currentValue, playtime) => playtime.totalMinutes + currentValue,
512
+ 0
513
+ );
514
+
515
return (
516
<div className="flex flex-col gap-2 mt-2">
517
+ {totalMinutes > 0 && (
518
+ <div className="underline">
519
+ Total: {Math.round((totalMinutes / 60) * 100) / 100} hours
520
+ </div>
521
+ )}
522
{playtimeData
523
.sort((a, b) => b.totalMinutes - a.totalMinutes)
524
.map((playtime) => (
0 commit comments