mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-01-21 06:34:30 +01:00
fix
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
import HeatMap from '@uiw/react-heat-map'
|
||||
import { Habit } from '@/lib/types'
|
||||
import { getDateInTimezone } from '@/lib/utils'
|
||||
import { useSettings } from '@/hooks/useSettings'
|
||||
|
||||
interface HabitHeatmapProps {
|
||||
habits: Habit[]
|
||||
@@ -24,9 +26,12 @@ export default function HabitHeatmap({ habits }: HabitHeatmapProps) {
|
||||
count
|
||||
}))
|
||||
|
||||
const { settings } = useSettings()
|
||||
|
||||
// Get start date (30 days ago)
|
||||
const startDate = new Date()
|
||||
startDate.setDate(startDate.getDate() - 30)
|
||||
const now = getDateInTimezone(new Date(), settings.system.timezone)
|
||||
const startDate = now
|
||||
startDate.setDate(now.getDate() - 30)
|
||||
|
||||
return (
|
||||
<div className="p-4 bg-white rounded-lg shadow">
|
||||
|
||||
Reference in New Issue
Block a user