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 {
display: flex;
flex-direction: column;
gap: 1rem;
gap: var(--size-4-6);
max-width: 50rem;
margin: 0 auto;
.section {
padding: 0.5rem;
background-color: var(--background-secondary);
border: 1px solid var(--background-modifier-border);
border-radius: 0.5rem;

View File

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