Fix date filter using month filter when year is all time and add background to stats section

This commit is contained in:
Evan Fiordeliso 2025-07-07 18:58:06 -04:00
parent dc7b84f287
commit cba99adc2a
2 changed files with 6 additions and 5 deletions

View File

@ -167,12 +167,13 @@
.obt-reading-stats { .obt-reading-stats {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 1rem; gap: var(--size-4-6);
max-width: 50rem; max-width: 50rem;
margin: 0 auto; margin: 0 auto;
.section { .section {
padding: 0.5rem; padding: 0.5rem;
background-color: var(--background-secondary);
border: 1px solid var(--background-modifier-border); border: 1px solid var(--background-modifier-border);
border-radius: 0.5rem; border-radius: 0.5rem;

View File

@ -29,11 +29,11 @@ export function createDateFilter<T>(
if (date.year() !== filterYear) { if (date.year() !== filterYear) {
return false; return false;
} }
}
if (filterMonth !== ALL_TIME) { if (filterMonth !== ALL_TIME) {
if (date.month() !== filterMonth - 1) { if (date.month() !== filterMonth - 1) {
return false; return false;
}
} }
} }
return true; return true;