aboutsummaryrefslogtreecommitdiff
path: root/pages/confirm-create-reserve.tsx
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-11-13 08:16:12 +0100
committerFlorian Dold <florian.dold@gmail.com>2016-11-13 08:16:52 +0100
commitb2128609ac8159a14224deba399144b3400c8c20 (patch)
tree4759dfda67c54f6838c3aef0951545ae18bb83bd /pages/confirm-create-reserve.tsx
parent3f0ee289c4a61991d0e75906a9bd949cebb39d20 (diff)
downloadwallet-core-b2128609ac8159a14224deba399144b3400c8c20.tar.xz
Finally give in and use React, minor tweeks.
Preact (a minimalistic React alternative) had too many bugs ...
Diffstat (limited to 'pages/confirm-create-reserve.tsx')
-rw-r--r--pages/confirm-create-reserve.tsx11
1 files changed, 5 insertions, 6 deletions
diff --git a/pages/confirm-create-reserve.tsx b/pages/confirm-create-reserve.tsx
index 9bff0e42a..833bfed27 100644
--- a/pages/confirm-create-reserve.tsx
+++ b/pages/confirm-create-reserve.tsx
@@ -31,7 +31,6 @@ import {ImplicitStateComponent, StateHolder} from "../lib/components";
"use strict";
-let h = preact.h;
function delay<T>(delayMs: number, value: T): Promise<T> {
return new Promise<T>((resolve, reject) => {
@@ -227,7 +226,7 @@ class ExchangeSelection extends ImplicitStateComponent<ExchangeSelectionProps> {
if (this.statusString()) {
return (
<p>
- <strong style="color: red;">A problem occured, see below.</strong>
+ <strong style={{color: "red"}}>A problem occured, see below.</strong>
</p>
);
}
@@ -238,12 +237,12 @@ class ExchangeSelection extends ImplicitStateComponent<ExchangeSelectionProps> {
);
}
- render(props: ExchangeSelectionProps): JSX.Element {
+ render(): JSX.Element {
return (
<div>
<p>
{"You are about to withdraw "}
- <strong>{amountToPretty(props.amount)}</strong>
+ <strong>{amountToPretty(this.props.amount)}</strong>
{" from your bank account into your wallet."}
</p>
{this.renderFeeStatus()}
@@ -359,7 +358,7 @@ class ExchangeSelection extends ImplicitStateComponent<ExchangeSelectionProps> {
renderStatus(): any {
if (this.statusString()) {
- return <p><strong style="color: red;">{this.statusString()}</strong></p>;
+ return <p><strong style={{color: "red"}}>{this.statusString()}</strong></p>;
} else if (!this.reserveCreationInfo()) {
return <p>Checking URL, please wait ...</p>;
}
@@ -384,7 +383,7 @@ export async function main() {
amount
};
- preact.render(<ExchangeSelection {...args} />, document.getElementById(
+ ReactDOM.render(<ExchangeSelection {...args} />, document.getElementById(
"exchange-selection")!);
} catch (e) {