& { isLoading?: boolean }) => {
const content = (() => {
if (type === 'address' && typeof value === 'string') {
return (
);
}
if (typeof value === 'object') {
const text = JSON.stringify(value, undefined, 4);
return (
);
}
return (
);
})();
return (
<>
{ indexed !== undefined && (
{ indexed ? 'true' : 'false' }
) }
{ content }
>
);
};
const LogDecodedInputDataTable = ({ data, isLoading }: Props) => {
const hasIndexed = data.some(({ indexed }) => indexed !== undefined);
const gridTemplateColumnsBase = hasIndexed ?
'50px 60px 40px minmax(0, 1fr)' :
'50px 60px minmax(0, 1fr)';
const gridTemplateColumnsLg = hasIndexed ?
'80px 80px 80px minmax(0, 1fr)' :
'80px 80px minmax(0, 1fr)';
return (
Name
Type
{ hasIndexed && Indexed? }
Data
{ data.map((item) => {
return
;
}) }
);
};
export default LogDecodedInputDataTable;