Function
StatusBadge
({ code }: { code: number | null })
Source from the content-addressed store, hash-verified
| 25 | } |
| 26 | |
| 27 | function StatusBadge({ code }: { code: number | null }) { |
| 28 | if (!code) return null; |
| 29 | const isOk = code >= 200 && code < 300; |
| 30 | return ( |
| 31 | <span |
| 32 | className={cn( |
| 33 | "text-xs px-1.5 py-0.5 rounded font-mono", |
| 34 | isOk |
| 35 | ? "bg-green-900/40 text-green-400 border border-green-800/40" |
| 36 | : "bg-red-900/40 text-red-400 border border-red-800/40" |
| 37 | )} |
| 38 | > |
| 39 | {code} |
| 40 | </span> |
| 41 | ); |
| 42 | } |
| 43 | |
| 44 | const MAX_VISIBLE = 80; |
| 45 | |
Callers
nothing calls this directly
Tested by
no test coverage detected