Skip to content

Commit

Permalink
Fix event filtering in today's view
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunkomath committed Jan 16, 2025
1 parent ea43920 commit 1a20545
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/(dashboard)/[tenant]/today/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -131,7 +131,7 @@ export default async function Today(props: {
<CalendarClockIcon className="w-6 h-6 inline-block mr-1" />
Events
</p>
{events.map((event) => (
{filteredEvents.map((event) => (
<Link
href={`/${tenant}/projects/${event.project.id}/events`}
key={event.id}
Expand Down

0 comments on commit 1a20545

Please sign in to comment.