This commit is contained in:
dohsimpson
2025-01-02 14:32:42 -05:00
parent 7afe81ddd5
commit 01c75e5412
2 changed files with 12 additions and 6 deletions

View File

@@ -11,9 +11,9 @@ interface HabitStreakProps {
}
export default function HabitStreak({ habits }: HabitStreakProps) {
const { settings } = useSettings()
// Get the last 30 days of data
const dates = Array.from({ length: 30 }, (_, i) => {
const { settings } = useSettings()
const d = getDateInTimezone(new Date(), settings.system.timezone)
d.setDate(d.getDate() - i)
return d.toISOString().split('T')[0]