From ff367411357390919d1971f444f66ed667ad6417 Mon Sep 17 00:00:00 2001 From: Leonardo F Pendragon <124473641+anofibonacci@users.noreply.github.com> Date: Tue, 21 Nov 2023 10:58:48 -0800 Subject: [PATCH 1/3] ignore events older than 5d & correctly label recents From line 55, I modified the if statement. This will prevent displaying events on the list that occurred more than five days ago, improving the User Experience greatly. This change also corrects the "Jan 1" CalendarIcon bug. (For a later improvement, perhaps this page might distinguish between Past, Current, and Upcoming Events and label/group them appropriately.) --- containers/EventsTimeline/index.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/containers/EventsTimeline/index.tsx b/containers/EventsTimeline/index.tsx index 09a64a3..d37ee91 100644 --- a/containers/EventsTimeline/index.tsx +++ b/containers/EventsTimeline/index.tsx @@ -52,12 +52,8 @@ export function groupEventsByDay(events: NDKEvent[]) { if (!eventStartTime) continue; const startDate = fromUnix(parseInt(eventStartTime)); const daysAway = daysOffset(startDate); - if (daysAway < 1) { - if (eventDays[`0`]) { - eventDays[`0`]!.push(event); - } else { - eventDays[`0`] = [event]; - } + if (daysAway < -5) { + continue; } else if (eventDays[`${daysAway}`]) { eventDays[`${daysAway}`]!.push(event); } else { From 565d70841cab8e007a2318fbe0e2b6e7dfc8103e Mon Sep 17 00:00:00 2001 From: Leonardo F Pendragon <124473641+anofibonacci@users.noreply.github.com> Date: Wed, 22 Nov 2023 12:10:09 -0800 Subject: [PATCH 2/3] fixed grammar Cleaned up the wording and included "flock" as a synonym for "community" (gotta lean in to the brand!) --- app/(app)/explore/_sections/CreateEvents.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/(app)/explore/_sections/CreateEvents.tsx b/app/(app)/explore/_sections/CreateEvents.tsx index d579c9a..4e6bc9d 100644 --- a/app/(app)/explore/_sections/CreateEvents.tsx +++ b/app/(app)/explore/_sections/CreateEvents.tsx @@ -23,8 +23,8 @@ export default function BecomeACreator() { Create Events on Nostr