2022-11-28 02:00:28 +00:00
|
|
|
import { Share2 } from 'lucide-react';
|
|
|
|
|
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 (
|
2022-11-22 12:16:34 +00:00
|
|
|
<TableContainer>
|
2022-11-28 02:00:28 +00:00
|
|
|
<TableTitle label="Network options" icon={Share2} />
|
2022-11-22 12:16:34 +00:00
|
|
|
<Table className="nopadding">
|
|
|
|
<DetailsTable dataCy="networkDetails-networkOptionsTable">
|
|
|
|
{networkEntries.map(([key, value]) => (
|
|
|
|
<DetailsTable.Row key={key} label={key}>
|
|
|
|
{value}
|
|
|
|
</DetailsTable.Row>
|
|
|
|
))}
|
|
|
|
</DetailsTable>
|
|
|
|
</Table>
|
|
|
|
</TableContainer>
|
2022-05-09 21:01:15 +00:00
|
|
|
);
|
|
|
|
}
|