embark-area-51/lib/modules/webserver/backend/contracts/components/function-area.js

21 lines
663 B
JavaScript

class FunctionArea extends React.Component {
constructor(props) {
super(props);
this.state = { };
}
render(){
const type = this.props.type;
const contract = this.props.contract;
const contractName = this.props.contractName;
return <React.Fragment>
{
this.props.contract.options.jsonInterface
.filter(item => item.type == type)
.map((item, i) => <FunctionForm key={i} contract={contract} contractName={contractName} abi={item} instanceUpdate={this.props.instanceUpdate} />)
}
</React.Fragment>;
}
}