mirror of
https://github.com/fullstack-cash/fullstack-gatsby-theme-bch-wallet.git
synced 2026-09-21 16:52:06 -07:00
fix(error): Fixed an error on send-receive feature
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import React from "react"
|
||||
import PropTypes from "prop-types"
|
||||
import { Content } from "adminlte-2-react"
|
||||
import { Content, Row, Col, Box } from "adminlte-2-react"
|
||||
import Receive from "./receive"
|
||||
import Send from "./send"
|
||||
|
||||
import './send-receive.css'
|
||||
import "./send-receive.css"
|
||||
|
||||
let _this
|
||||
class SendReceive extends React.Component {
|
||||
constructor(props) {
|
||||
@@ -16,16 +17,25 @@ class SendReceive extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
<Content>
|
||||
<Receive
|
||||
walletInfo={_this.props.walletInfo}
|
||||
/>
|
||||
<Send
|
||||
updateBalance={_this.props.updateBalance}
|
||||
bchWallet={_this.props.bchWallet}
|
||||
/>
|
||||
|
||||
</Content>
|
||||
{_this.props.walletInfo.mnemonic ? (
|
||||
<Content>
|
||||
<Receive walletInfo={_this.props.walletInfo} />
|
||||
<Send
|
||||
updateBalance={_this.props.updateBalance}
|
||||
bchWallet={_this.props.bchWallet}
|
||||
/>
|
||||
</Content>
|
||||
) : (
|
||||
<Content>
|
||||
<Box padding="true" className="container-nofound">
|
||||
<Row>
|
||||
<Col xs={12}>
|
||||
<em>You need to create or import a wallet first</em>
|
||||
</Col>
|
||||
</Row>
|
||||
</Box>
|
||||
</Content>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -35,7 +45,7 @@ SendReceive.propTypes = {
|
||||
walletInfo: PropTypes.object.isRequired,
|
||||
updateBalance: PropTypes.func.isRequired,
|
||||
setBchWallet: PropTypes.func.isRequired,
|
||||
bchWallet:PropTypes.object,
|
||||
bchWallet: PropTypes.object,
|
||||
}
|
||||
|
||||
export default SendReceive
|
||||
|
||||
Reference in New Issue
Block a user