diff --git a/react/src/components/dashboard/bodyBottom/bodyBottom.js b/react/src/components/dashboard/bodyBottom/bodyBottom.js index d578035..f8b741e 100644 --- a/react/src/components/dashboard/bodyBottom/bodyBottom.js +++ b/react/src/components/dashboard/bodyBottom/bodyBottom.js @@ -3,31 +3,30 @@ import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; export default class BodyEnd extends React.PureComponent { + static propTypes = { + children: PropTypes.node, + }; - static propTypes = { - children: PropTypes.node, - }; + componentDidMount() { + this._popup = document.createElement('div'); + document.body.appendChild(this._popup); + this._render(); + } - componentDidMount() { - this._popup = document.createElement('div'); - document.body.appendChild(this._popup); - this._render(); - } + componentDidUpdate() { + this._render(); + } - componentDidUpdate() { - this._render(); - } + componentWillUnmount() { + ReactDOM.unmountComponentAtNode(this._popup); + document.body.removeChild(this._popup); + } - componentWillUnmount() { - ReactDOM.unmountComponentAtNode(this._popup); - document.body.removeChild(this._popup); - } + _render() { + ReactDOM.render(this.props.children, this._popup); + } - _render() { - ReactDOM.render(this.props.children, this._popup); - } - - render() { - return null; - } + render() { + return null; + } } \ No newline at end of file diff --git a/react/src/components/dashboard/invoiceModal/invoiceModal.js b/react/src/components/dashboard/invoiceModal/invoiceModal.js index 99a1971..73602ab 100755 --- a/react/src/components/dashboard/invoiceModal/invoiceModal.js +++ b/react/src/components/dashboard/invoiceModal/invoiceModal.js @@ -37,17 +37,17 @@ class InvoiceModal extends React.Component { [e.target.name]: e.target.value }, this.updateQRContent); } - + updateQRContent() { this.setState({ - content: JSON.stringify({ - "address": this.state.qrAddress, - "amount": this.state.qrAmount, - "coin": this.props.ActiveCoin.coin, + content: JSON.stringify({ + address: this.state.qrAddress, + amount: this.state.qrAmount, + coin: this.props.ActiveCoin.coin, }), }); } - + closeModal() { this.setState({ modalIsOpen: false, @@ -99,7 +99,7 @@ class InvoiceModal extends React.Component { } items.push( - AddressItemRender.call(this, address, type) + AddressItemRender.call(this, address, type) ); } @@ -115,7 +115,6 @@ class InvoiceModal extends React.Component { } else { return InvoiceModalButtonRender.call(this); } - } } @@ -134,10 +133,8 @@ const mapStateToProps = (state) => { }, Dashboard: { activeHandle: state.Dashboard.activeHandle, - } - + }, }; - }; export default connect(mapStateToProps)(InvoiceModal); diff --git a/react/src/components/dashboard/invoiceModal/invoiceModal.render.js b/react/src/components/dashboard/invoiceModal/invoiceModal.render.js index c2f874f..25b59b9 100644 --- a/react/src/components/dashboard/invoiceModal/invoiceModal.render.js +++ b/react/src/components/dashboard/invoiceModal/invoiceModal.render.js @@ -26,37 +26,37 @@ export const InvoiceModalRender = function () {
+ type="number" + min="0" + className="form-control" + id="qrCoinAmount" + name="qrAmount" + placeholder="0" + autoComplete="off" + value={ this.state.qrAmount } + onChange={ this.updateInput } />
@@ -65,10 +65,10 @@ export const InvoiceModalRender = function () { size={ 198 } />
-
+

- { translate('INDEX.QR_CONTENT') }:
+ { translate('INDEX.QR_CONTENT') }:
{ this.state.content }

@@ -87,10 +87,10 @@ export const InvoiceModalRender = function () { export const InvoiceModalButtonRender = function () { return ( -