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
7 changes: 7 additions & 0 deletions components/search/hearings/HearingHit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ export const HearingHit = ({ hit }: { hit: HearingHitData }) => {
navigateToHearing()
}

var yesterday = new Date()
yesterday.setDate(yesterday.getDate() - 1)

return (
<StyledCard
role="link"
Expand All @@ -100,6 +103,10 @@ export const HearingHit = ({ hit }: { hit: HearingHitData }) => {
<Badge bg="success" pill>
{t("video_available", { ns: "search" })}
</Badge>
) : startsAt > yesterday ? (
<Badge bg="info" text="dark" pill>
{t("video_upcoming", { ns: "search" })}
</Badge>
) : (
<Badge bg="info" text="dark" pill>
{t("video_unavailable", { ns: "search" })}
Expand Down
3 changes: 2 additions & 1 deletion public/locales/en/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
},
"search_error": "Something went wrong. Please try again. Original message: {{error}}",
"video_available": "Video available",
"video_unavailable": "Video and transcript not yet available",
"video_upcoming": "Video not yet posted by the legislature; transcript will be generated once it is available",
"video_unavailable": "Not available: Video and transcript",
"location_label": "Location",
"agenda_label": "Agenda Topics",
"bills_label": "Bills",
Expand Down