Add chamber color badges, action history fallback, and task status polling
- Add chamberBadgeColor util: amber/gold for Senate, slate/silver for House - Apply chamber badge to BillCard and bill detail header - ActionTimeline: show latest_action_date/text as fallback when full history not yet fetched, with note that full history loads in background - Manual Controls: poll task status every 5s after triggering, show spinning indicator while running, task ID prefix, and completion/failure state Authored-By: Jack Levy
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import Link from "next/link";
|
||||
import { TrendingUp, Calendar, User } from "lucide-react";
|
||||
import { Bill } from "@/lib/types";
|
||||
import { billLabel, cn, formatDate, partyBadgeColor, trendColor } from "@/lib/utils";
|
||||
import { billLabel, chamberBadgeColor, cn, formatDate, partyBadgeColor, trendColor } from "@/lib/utils";
|
||||
import { FollowButton } from "./FollowButton";
|
||||
|
||||
interface BillCardProps {
|
||||
@@ -22,9 +22,11 @@ export function BillCard({ bill, compact = false }: BillCardProps) {
|
||||
<span className="text-xs font-mono font-semibold text-muted-foreground bg-muted px-1.5 py-0.5 rounded">
|
||||
{label}
|
||||
</span>
|
||||
<span className="text-xs text-muted-foreground">
|
||||
{bill.chamber}
|
||||
</span>
|
||||
{bill.chamber && (
|
||||
<span className={cn("text-xs px-1.5 py-0.5 rounded font-medium", chamberBadgeColor(bill.chamber))}>
|
||||
{bill.chamber}
|
||||
</span>
|
||||
)}
|
||||
{tags.map((tag) => (
|
||||
<span
|
||||
key={tag}
|
||||
|
||||
Reference in New Issue
Block a user