Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/.pnp
.pnp.js
.yarn*
package-lock.json

# testing
/coverage
Expand Down
4 changes: 2 additions & 2 deletions components/HearingsScheduled/HearingsScheduled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type EventData = {
type: "hearing" | "session"
name: string
id: number
location: string
location?: string
fullDate: Date // TODO: Could be a timestamp
year: string
month: string
Expand Down Expand Up @@ -132,7 +132,7 @@ export const EventCard = ({
)}
</p>
<p className={`lh-sm mb-3 ms-2 text-secondary`}>
{truncateEntry(location)}
{truncateEntry(location ?? "")}
</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/HearingsScheduled/calendarEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const useCalendarEvents = () => {
type: e.type,
name: e.content.Name ?? "Hearing",
id: e.content.EventId,
location: e.content.Location.LocationName,
location: e.content.Location?.LocationName ?? undefined,
fullDate: eventDate.toJSDate(),
year: date.year,
month: date.month,
Expand Down
10 changes: 5 additions & 5 deletions functions/src/events/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ export const Session = BaseEvent.extend({
})
export type HearingLocation = Static<typeof HearingLocation>
export const HearingLocation = Record({
AddressLine1: String,
AddressLine1: Nullable(String),
AddressLine2: Nullable(String),
City: String,
LocationName: String,
State: String,
ZipCode: String
City: Nullable(String),
LocationName: Nullable(String),
State: Nullable(String),
ZipCode: Nullable(String)
})
export type HearingContent = Static<typeof HearingContent>
export const HearingContent = BaseEventContent.extend({
Expand Down
4 changes: 2 additions & 2 deletions functions/src/hearings/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ export const {
year: schedule.year,
committeeCode: content.HearingHost?.CommitteeCode ?? undefined,
committeeName: committeeName ?? undefined,
locationName: content.Location?.LocationName,
locationCity: content.Location?.City,
locationName: content.Location?.LocationName ?? undefined,
locationCity: content.Location?.City ?? undefined,
chairNames: hearing.committeeChairs ?? [],
agendaTopics,
billNumbers: dedupedBills.map(bill => bill.number),
Expand Down
Loading