diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-10-05 17:38:02 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-10-05 17:38:02 +0200 |
commit | 0c8a6e21f0324e25d1ec59bcdddf8c5c49b01421 (patch) | |
tree | ccfa63b417a9570c5af2bdbeaa416be5ffa2d312 /pages | |
parent | 7fb527b0009a29605c32e663ab9e6a812a8cc5a8 (diff) |
prettier syntax (JSX) for rendering
Diffstat (limited to 'pages')
-rw-r--r-- | pages/confirm-contract.tsx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/pages/confirm-contract.tsx b/pages/confirm-contract.tsx index 8e553b05b..9c1752568 100644 --- a/pages/confirm-contract.tsx +++ b/pages/confirm-contract.tsx @@ -51,13 +51,14 @@ class Details extends preact.Component<DetailProps, DetailState> { render(props: DetailProps, state: DetailState) { if (state.collapsed) { - return h("div", {}, - h("button", { - className: "linky", - onClick: () => { - this.setState({collapsed: false}); - } - }, "show more details")); + return ( + <div> + <button className="linky" + onClick={() => { this.setState({collapsed: false})}}> + show more details + </button> + </div> + ); } else { return h("div", {}, h("button", { @@ -167,7 +168,7 @@ class ContractPrompt extends preact.Component<ContractPromptProps, ContractPromp i18n`Confirm Payment`), (state.error ? h("p", {className: "errorbox"}, - state.error) : h("p", "")), + state.error) : h("p", "")), h(Details, {contract: c}) ); } |