Skip to content

Commit 4f09840

Browse files
fixed useGithubData.tsx as per the suggestion of coderabbitAi
1 parent 1acd66b commit 4f09840

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/hooks/useGitHubData.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,16 @@ const initialDailyActivity: DailyActivity = {
3939
reminders: [],
4040
};
4141

42-
const getDateKey = (date: Date): string =>
43-
date.toISOString().split('T')[0];
42+
const getDateKey = (date: Date): string => {
43+
const year = date.getFullYear();
44+
const month = `${date.getMonth() + 1}`.padStart(2, '0');
45+
const day = `${date.getDate()}`.padStart(2, '0');
46+
47+
return `${year}-${month}-${day}`;
48+
};
4449

4550
const buildDailyReminders = ({
51+
4652
commitCountToday,
4753
prOpenedToday,
4854
prMergedToday,

0 commit comments

Comments
 (0)