From 12e939380e0e9783daa9cc892a432b2b5a9a5795 Mon Sep 17 00:00:00 2001 From: mertbagt Date: Sun, 19 Jul 2026 13:35:29 -0400 Subject: [PATCH 1/2] remove value overrriden property --- components/OurTeam/Partners.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/OurTeam/Partners.tsx b/components/OurTeam/Partners.tsx index 5ab695e1b..0b11ce8fc 100644 --- a/components/OurTeam/Partners.tsx +++ b/components/OurTeam/Partners.tsx @@ -14,7 +14,7 @@ export const LocalizedContent = (props: { components={{ a: ( Date: Tue, 18 Aug 2026 21:25:38 -0400 Subject: [PATCH 2/2] generate legislatorEvents --- .../HearingsScheduled/HearingsScheduled.tsx | 1 + .../LegislatorProfilePage.tsx | 1 + .../LegislatorProfile/LegislatorSidebar.tsx | 4 +- .../SidebarComponents/UpcomingHearings.tsx | 54 ++++++++++++++++++- 4 files changed, 58 insertions(+), 2 deletions(-) diff --git a/components/HearingsScheduled/HearingsScheduled.tsx b/components/HearingsScheduled/HearingsScheduled.tsx index bb51b18d6..88508ee81 100644 --- a/components/HearingsScheduled/HearingsScheduled.tsx +++ b/components/HearingsScheduled/HearingsScheduled.tsx @@ -9,6 +9,7 @@ export type EventData = { index: number type: "hearing" | "session" name: string + code?: string | null id: number location?: string fullDate: Date // TODO: Could be a timestamp diff --git a/components/LegislatorProfile/LegislatorProfilePage.tsx b/components/LegislatorProfile/LegislatorProfilePage.tsx index 24ea34433..e65576a90 100644 --- a/components/LegislatorProfile/LegislatorProfilePage.tsx +++ b/components/LegislatorProfile/LegislatorProfilePage.tsx @@ -376,6 +376,7 @@ export function LegislatorProfilePage({ - + latestDate) latestDate = eventDate + + const index = Math.floor(eventDate.diff(thisMonth, "months").months) + const date = formatDate(e.content.EventDate) + if (e.type === "hearing") { + eventList.push({ + index, + type: e.type, + name: e.content.Name ?? "Hearing", + code: e.content.HearingHost.CommitteeCode, + id: e.content.EventId, + location: e.content.Location?.LocationName ?? undefined, + fullDate: eventDate.toJSDate(), + year: date.year, + month: date.month, + date: date.date, + day: date.day, + time: date.time + }) + } + } + } + + const LegislatorCommitteCodes = committeeList.map(code => code.CommitteeCode) + + let legislatorEvents: any[] = [] + + if (events) { + eventList.forEach(event => { + if (LegislatorCommitteCodes.includes(event.code)) { + legislatorEvents.push(event) + } + }) + } + + console.log("legislatorEvents", legislatorEvents) + return - Upcoming Hearings }