feat: add books/pages metric toggle on reading activity chart

Allow switching between number of books and number of pages on the
dashboard reading activity chart. Adds pages_read to the stats API
response and a MetricToggle component alongside the existing PeriodToggle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-24 21:12:43 +01:00
parent 4049c94fc0
commit 2febab2c39
6 changed files with 96 additions and 15 deletions

View File

@@ -699,12 +699,14 @@ export type RecentlyReadItem = {
export type MonthlyReading = {
month: string;
books_read: number;
pages_read: number;
};
export type UserMonthlyReading = {
month: string;
username: string;
books_read: number;
pages_read: number;
};
export type JobTimePoint = {