(method)
| 32 | } |
| 33 | |
| 34 | const getMethodColor = (method) => { |
| 35 | const colors = { |
| 36 | GET: "sky-500", |
| 37 | POST: "green-500", |
| 38 | PUT: "orange-500", |
| 39 | PATCH: "emerald-500", |
| 40 | DELETE: "rose-500", |
| 41 | HEAD: "indigo-500", |
| 42 | OPTIONS: "blue-500", |
| 43 | DEFAULT: "gray-500", |
| 44 | }; |
| 45 | return method in colors ? colors[method] : colors["DEFAULT"]; |
| 46 | }; |
| 47 | |
| 48 | const getStatusColor = (status) => { |
| 49 | let first_digit = Math.floor(status / 100); |