More stats and cleanup

This commit is contained in:
ZXY101
2023-10-05 00:49:17 +02:00
parent 5c652344c2
commit 8c97b1587a
7 changed files with 87 additions and 31 deletions

View File

@@ -24,6 +24,13 @@
return total;
}, 0)
: 0;
$: minutesRead = $volumes
? Object.values($volumes).reduce((total: number, { timeReadInMinutes }) => {
total += timeReadInMinutes;
return total;
}, 0)
: 0;
</script>
<AccordionItem>
@@ -32,5 +39,6 @@
<p>Completed volumes: {completed}</p>
<p>Pages read: {pagesRead}</p>
<p>Characters read: {charsRead}</p>
<p>Minutes read: {minutesRead}</p>
</div>
</AccordionItem>