From 3e9cb66db20d4f263f60671453f9bbf59b59975a Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Sat, 1 Feb 2025 00:09:07 -0800 Subject: [PATCH] Fixed index errors. --- .../(main)/websites/[websiteId]/sessions/SessionsWeekly.tsx | 4 ++-- .../[websiteId]/sessions/[sessionId]/SessionActivity.tsx | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/app/(main)/websites/[websiteId]/sessions/SessionsWeekly.tsx b/src/app/(main)/websites/[websiteId]/sessions/SessionsWeekly.tsx index 3e15ddfa..b473a989 100644 --- a/src/app/(main)/websites/[websiteId]/sessions/SessionsWeekly.tsx +++ b/src/app/(main)/websites/[websiteId]/sessions/SessionsWeekly.tsx @@ -54,10 +54,10 @@ export function SessionsWeekly({ websiteId }: { websiteId: string }) {
{format(getDayOfWeekAsDate(index), 'EEE', { locale: dateLocale })}
- {day?.map((hour: number) => { + {day?.map((hour: number, n) => { const pct = hour / max; return ( -
+
{hour > 0 && ( + {showHeader && (
{formatTimezoneDate(createdAt, 'EEEE, PPP')}
)} @@ -44,7 +45,7 @@ export function SessionActivity({ {eventName ? : }
{eventName || urlPath}
- + ); })}