From f687b9880ebef1eaa768aa47b1b9321b721a3050 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Tue, 15 May 2018 08:33:07 -0400 Subject: [PATCH] Reorganizing template --- .../scaffolding-react/templates/dapp.js.tpl | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/lib/modules/scaffolding-react/templates/dapp.js.tpl b/lib/modules/scaffolding-react/templates/dapp.js.tpl index 023c64a0..9b9068eb 100644 --- a/lib/modules/scaffolding-react/templates/dapp.js.tpl +++ b/lib/modules/scaffolding-react/templates/dapp.js.tpl @@ -6,6 +6,32 @@ import ReactDOM from 'react-dom'; import { FormGroup, ControlLabel, FormControl, Checkbox, Button, Alert, InputGroup } from 'react-bootstrap'; +class {{contractName}}UI extends React.Component { + constructor (props) { + super(props); + this.state = { + }; + } + + render(){ + return (
+ {{#each functions}} + <{{capitalize name}}Form{{@index}} /> + {{/each}} +
); + } +} + + +ReactDOM.render(
+

{{title}}

+ <{{contractName}}UI /> +
, + document.getElementById('app') +); + + + {{#each functions}} class {{capitalize name}}Form{{@index}} extends React.Component { constructor(props){