From fdb216d8283c9a7b2c3bb9640c3f42119e3aac0f Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Sun, 2 Aug 2026 20:37:55 +0530 Subject: [PATCH 1/2] fix: code quality and safety improvements --- src/components/StreakWidget.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/StreakWidget.tsx b/src/components/StreakWidget.tsx index c5b28a52..7957e017 100644 --- a/src/components/StreakWidget.tsx +++ b/src/components/StreakWidget.tsx @@ -121,7 +121,7 @@ export function StreakWidget({ {day.active ? ( ) : ( - day.day.charAt(0) + day.day[0] )} From 83f870eb0701922945ff79f7ef9c85e0b4d2e507 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Mon, 3 Aug 2026 00:14:26 +0530 Subject: [PATCH 2/2] fix: additional real bug fixes --- src/components/StreakWidget.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/StreakWidget.tsx b/src/components/StreakWidget.tsx index 7957e017..968aabd9 100644 --- a/src/components/StreakWidget.tsx +++ b/src/components/StreakWidget.tsx @@ -44,7 +44,7 @@ export function StreakWidget({ }, [currentStreak]); // Construct chart data for the streak history chart - const chartData = dailyActivity.map((day) => ({ + const chartData = (dailyActivity ?? []).map((day) => ({ label: day.day, value: day.active ? 1 : 0, color: day.active ? '#f59e0b' : '#e5e7eb', // warning yellow/orange or gray