Skip to content

Commit f7437d8

Browse files
committed
fix2
1 parent d83e124 commit f7437d8

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/app/(dashboard)/insights/page.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ export default function InsightsPage() {
6565
<div className="h-100 bg-slate-100 rounded-xl" />
6666
<div className="h-100 bg-slate-100 rounded-xl" />
6767
</div>
68-
400px]
6968
</div>
7069
);
7170
}
@@ -120,8 +119,11 @@ export default function InsightsPage() {
120119
!columnTitleLower.includes("hoàn thành") &&
121120
task.deadline
122121
) {
123-
const dueDate = new Date(task.deadline);
124-
dueDate.setHours(0, 0, 0, 0);
122+
const [year, month, day] = String(task.deadline)
123+
.slice(0, 10)
124+
.split("-")
125+
.map(Number);
126+
const dueDate = new Date(year, month - 1, day);
125127
if (dueDate < today) {
126128
overdueTasks++;
127129
}

0 commit comments

Comments
 (0)