import React, { FC, HTMLAttributes } from 'react';
import MaterialTable from 'material-table';
import { LinkedDataIdentifier } from '../../../atoms/LinkedDataIdentifier';
import { ContentTableRow } from './ContentTableRow';
export interface Props extends HTMLAttributes {
label?: string;
rows?: any[];
}
// TODO: fix walletState so it does not get mutated params...
export const WalletContentTable: FC = ({ label, rows }: any) => {
const columns: any = [
{
title: 'Type',
field: 'type',
render: (rowData: any) => {
return Array.isArray(rowData.type) ? rowData.type[0] : rowData.type;
},
},
{
title: 'Identifier',
field: 'id',
render: (rowData: any) => {
if (rowData.id) {
return ;
}
return ;
},
},
];
return (
{
const withoutMutation: any = { ...rowData };
delete withoutMutation.tableData;
return ;
}}
/>
);
};