({ success, error }: { success: boolean; error?: string })
| 102 | } |
| 103 | |
| 104 | function StatusBadge({ success, error }: { success: boolean; error?: string }) { |
| 105 | if (success) { |
| 106 | return ( |
| 107 | <span className="inline-flex items-center justify-center w-4 h-4 text-green-600 dark:text-green-400"> |
| 108 | <svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"> |
| 109 | <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 13l4 4L19 7" /> |
| 110 | </svg> |
| 111 | </span> |
| 112 | ); |
| 113 | } |
| 114 | |
| 115 | const errorIcon = ( |
| 116 | <span className="inline-flex items-center justify-center w-4 h-4 text-red-600 dark:text-red-400 cursor-help"> |
| 117 | <svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"> |
| 118 | <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" /> |
| 119 | </svg> |
| 120 | </span> |
| 121 | ); |
| 122 | |
| 123 | if (error) { |
| 124 | return <ErrorTooltip error={error}>{errorIcon}</ErrorTooltip>; |
| 125 | } |
| 126 | |
| 127 | return errorIcon; |
| 128 | } |
| 129 | |
| 130 | export default function RequestView() { |
| 131 | const [requests, setRequests] = useState<Request[]>([]); |
nothing calls this directly
no outgoing calls
no test coverage detected