forked from extern/bruno
28 lines
654 B
JavaScript
28 lines
654 B
JavaScript
|
import React from 'react';
|
||
|
import StyledWrapper from './StyledWrapper';
|
||
|
|
||
|
const ResponseHeaders = ({headers}) => {
|
||
|
return (
|
||
|
<StyledWrapper className="mt-4">
|
||
|
<table>
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<td>Name</td>
|
||
|
<td>Value</td>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
{headers && headers.length ? headers.map((header, index) => {
|
||
|
return (
|
||
|
<tr key={index}>
|
||
|
<td>{header[0]}</td>
|
||
|
<td>{header[1]}</td>
|
||
|
</tr>
|
||
|
);
|
||
|
}) : null}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</StyledWrapper>
|
||
|
)
|
||
|
};
|
||
|
export default ResponseHeaders;
|