Skip to content

Commit 297a258

Browse files
viki-shclaude
andcommitted
Polish Explore detail: 2x2 severity, fine amounts, title font, cleanup
- Severity snapshot back to 2x2 grid layout - Monetary Penalty outcomes show fine amount (e.g. "$245.0M fine") - Title matches CaseDetail h1: text-4xl/5xl font-bold (not hero-title) - Remove box around enforcement style (plain text) - Remove dotted line separator after Main Privacy Laws Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8cc8fcd commit 297a258

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

src/components/JurisdictionDetail.tsx

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ function formatCurrency(amount: number): string {
1515
return `$${amount.toLocaleString()}`;
1616
}
1717

18+
/** Format outcome for the table — show fine amount for Monetary Penalty */
19+
function formatOutcome(outcome: string, fine: number): string {
20+
if (outcome === "Monetary Penalty" && fine > 0) {
21+
return `${formatCurrency(fine)} fine`;
22+
}
23+
return outcome;
24+
}
25+
1826
export default function JurisdictionDetail({ jurisdiction }: JurisdictionDetailProps) {
1927
const info = JURISDICTION_INFO[jurisdiction];
2028
const [lawsOpen, setLawsOpen] = useState(false);
@@ -79,14 +87,14 @@ export default function JurisdictionDetail({ jurisdiction }: JurisdictionDetailP
7987

8088
return (
8189
<div className="border-2 border-black bg-card brutalist-shadow animate-in fade-in slide-in-from-top-2 duration-300">
82-
{/* Header */}
90+
{/* Header — matches CaseDetail h1 style: text-4xl/5xl font-bold */}
8391
<div className="px-6 py-5 border-b-2 border-black bg-card">
8492
<div className="flex items-center gap-5">
8593
<JurisdictionLogo jurisdiction={jurisdiction} className="w-16 h-16 shrink-0" />
8694
<div className="min-w-0">
87-
<h2 className="hero-title text-3xl md:text-4xl tracking-tight uppercase leading-tight">
95+
<h1 className="text-4xl md:text-5xl font-bold tracking-tight uppercase">
8896
{info.fullName}
89-
</h2>
97+
</h1>
9098
<p className="text-[10px] font-mono font-bold uppercase tracking-widest text-muted-foreground mt-1">
9199
{info.abbreviation}
92100
</p>
@@ -102,16 +110,14 @@ export default function JurisdictionDetail({ jurisdiction }: JurisdictionDetailP
102110
<p className="text-[15px] leading-relaxed">{info.overview}</p>
103111
</section>
104112

105-
{/* 2. Enforcement Style */}
113+
{/* 2. Enforcement Style — plain text, no box */}
106114
<section>
107115
<h2 className="text-2xl font-bold tracking-tight mb-4">\ ENFORCEMENT STYLE</h2>
108116
<div className="h-[3px] bg-border mb-4" />
109-
<div className="brutalist-border info-box p-6">
110-
<p className="text-[15px] leading-relaxed">{info.enforcementStyle}</p>
111-
</div>
117+
<p className="text-[15px] leading-relaxed">{info.enforcementStyle}</p>
112118
</section>
113119

114-
{/* 3. Main Privacy Laws — loot-drop accordion */}
120+
{/* 3. Main Privacy Laws — loot-drop accordion, no dashed line after */}
115121
<section>
116122
<button
117123
type="button"
@@ -138,19 +144,17 @@ export default function JurisdictionDetail({ jurisdiction }: JurisdictionDetailP
138144
)}
139145
</section>
140146

141-
<div className="border-t-2 border-dashed border-border" />
142-
143-
{/* 4. From Our Dataset — contains severity snapshot + bar charts + table */}
147+
{/* 4. From Our Dataset */}
144148
<section>
145149
<h2 className="text-2xl font-bold tracking-tight mb-4">\ FROM OUR DATASET</h2>
146150
<div className="h-[3px] bg-border mb-4" />
147151
<p className="text-[10px] font-mono font-bold uppercase tracking-widest text-muted-foreground mb-6">
148152
{stats.totalCases} cases · {stats.minYear}{stats.maxYear}
149153
</p>
150154

151-
{/* Severity Snapshot */}
155+
{/* Severity Snapshot — 2x2 grid */}
152156
<p className="text-[10px] font-mono font-bold uppercase tracking-widest text-muted-foreground mb-3">Severity Snapshot</p>
153-
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 mb-8">
157+
<div className="grid grid-cols-2 gap-4 mb-8">
154158
<div className="detail-yellow-box p-4">
155159
<p className="text-[10px] font-mono font-bold uppercase tracking-wider text-muted-foreground">Total Fines</p>
156160
<p className="text-lg font-bold mt-1">{formatCurrency(stats.totalFines)}</p>
@@ -193,7 +197,7 @@ export default function JurisdictionDetail({ jurisdiction }: JurisdictionDetailP
193197
{stats.topCompanies.map((c, i) => (
194198
<tr key={c.name + c.year} className={`border-b border-border ${i % 2 === 0 ? "bg-card" : "bg-background"}`}>
195199
<td className="px-4 py-2.5 font-bold">{c.name}</td>
196-
<td className="px-4 py-2.5 text-right text-xs">{c.outcome}</td>
200+
<td className="px-4 py-2.5 text-right text-xs">{formatOutcome(c.outcome, c.fine)}</td>
197201
<td className="px-4 py-2.5 text-right">{c.year}</td>
198202
</tr>
199203
))}
@@ -214,7 +218,6 @@ function BarSection({ title, data, total }: { title: string; data: [string, numb
214218
<p className="text-[10px] font-mono font-bold uppercase tracking-widest text-muted-foreground mb-3">{title}</p>
215219
<div className="space-y-3">
216220
{data.map(([label, count]) => {
217-
// Bar width relative to the largest item so bars are visually distinct
218221
const barPct = maxCount > 0 ? (count / maxCount) * 100 : 0;
219222
return (
220223
<div key={label}>

0 commit comments

Comments
 (0)