(result: string)
| 19 | |
| 20 | // Very rough HTTP status parsing from result text |
| 21 | function parseStatus(result: string): number | null { |
| 22 | const m = result.match(/^(?:HTTP[^\n]*\s)?(\d{3})\b/m); |
| 23 | if (m) return parseInt(m[1], 10); |
| 24 | return null; |
| 25 | } |
| 26 | |
| 27 | function StatusBadge({ code }: { code: number | null }) { |
| 28 | if (!code) return null; |