bruno/renderer/components/ResponsePane/ResponseHeaders/index.js

28 lines
659 B
JavaScript
Raw Normal View History

2021-12-31 18:55:53 +01:00
import React from 'react';
import StyledWrapper from './StyledWrapper';
const ResponseHeaders = ({headers}) => {
return (
<StyledWrapper className="mt-3 px-3">
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}>
<td>{header[0]}</td>
<td>{header[1]}</td>
</tr>
);
}) : null}
</tbody>
</table>
</StyledWrapper>
)
};
export default ResponseHeaders;