2021-12-31 18:55:53 +01:00
|
|
|
import React from 'react';
|
|
|
|
import StyledWrapper from './StyledWrapper';
|
|
|
|
|
|
|
|
const ResponseHeaders = ({headers}) => {
|
|
|
|
return (
|
2022-03-15 21:18:33 +01:00
|
|
|
<StyledWrapper className="mt-3 px-3 pb-4 w-full">
|
2021-12-31 18:55:53 +01:00
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<td>Name</td>
|
|
|
|
<td>Value</td>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{headers && headers.length ? headers.map((header, index) => {
|
|
|
|
return (
|
|
|
|
<tr key={index}>
|
2022-03-14 18:46:49 +01:00
|
|
|
<td className="key">{header[0]}</td>
|
|
|
|
<td className="value">{header[1]}</td>
|
2021-12-31 18:55:53 +01:00
|
|
|
</tr>
|
|
|
|
);
|
|
|
|
}) : null}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</StyledWrapper>
|
|
|
|
)
|
|
|
|
};
|
|
|
|
export default ResponseHeaders;
|