From 1a20545d8d75f066ea2d43a0b5d4cb937b5150bf Mon Sep 17 00:00:00 2001
From: Arjun Komath
Date: Thu, 16 Jan 2025 19:34:18 +1100
Subject: [PATCH] Fix event filtering in today's view
---
app/(dashboard)/[tenant]/today/page.tsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/(dashboard)/[tenant]/today/page.tsx b/app/(dashboard)/[tenant]/today/page.tsx
index a0a77e7..4ef043d 100644
--- a/app/(dashboard)/[tenant]/today/page.tsx
+++ b/app/(dashboard)/[tenant]/today/page.tsx
@@ -108,10 +108,10 @@ export default async function Today(props: {
.filter((t) => t.dueDate! < new Date());
const filteredEvents = events.filter((event) =>
- filterByRepeatRule(event, today),
+ filterByRepeatRule(event, new Date(today)),
);
- const summary = ` You've got ${dueToday.length > 0 ? dueToday.length : "no"} task(s) due today, ${overDue.length > 0 ? overDue.length : "no"} overdue task(s) and ${events.length > 0 ? events.length : "no"} event(s) today.`;
+ const summary = ` You've got ${dueToday.length > 0 ? dueToday.length : "no"} task(s) due today, ${overDue.length > 0 ? overDue.length : "no"} overdue task(s) and ${filteredEvents.length > 0 ? filteredEvents.length : "no"} event(s) today.`;
const { tenant } = await props.params;
@@ -131,7 +131,7 @@ export default async function Today(props: {
Events
- {events.map((event) => (
+ {filteredEvents.map((event) => (