2022-07-24 23:57:18 +00:00
|
|
|
import { Table, TableContainer, TableTitle } from '@@/datatables';
|
2022-06-17 16:18:42 +00:00
|
|
|
import { DetailsTable } from '@@/DetailsTable';
|
2022-05-09 21:01:15 +00:00
|
|
|
|
|
|
|
import { NetworkOptions } from '../types';
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
options: NetworkOptions;
|
|
|
|
};
|
|
|
|
|
|
|
|
export function NetworkOptionsTable({ options }: Props) {
|
|
|
|
const networkEntries = Object.entries(options);
|
|
|
|
|
|
|
|
if (networkEntries.length === 0) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="row">
|
|
|
|
<div className="col-lg-12 col-md-12 col-xs-12">
|
2022-07-24 23:57:18 +00:00
|
|
|
<TableContainer>
|
|
|
|
<TableTitle label="Network options" icon="share-2" featherIcon />
|
|
|
|
<Table className="nopadding">
|
2022-05-09 21:01:15 +00:00
|
|
|
<DetailsTable dataCy="networkDetails-networkOptionsTable">
|
|
|
|
{networkEntries.map(([key, value]) => (
|
|
|
|
<DetailsTable.Row key={key} label={key}>
|
|
|
|
{value}
|
|
|
|
</DetailsTable.Row>
|
|
|
|
))}
|
|
|
|
</DetailsTable>
|
2022-07-24 23:57:18 +00:00
|
|
|
</Table>
|
|
|
|
</TableContainer>
|
2022-05-09 21:01:15 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|