mirror of
https://github.com/fullstack-cash/fullstack-gatsby-theme-bch-wallet.git
synced 2026-09-22 17:22:05 -07:00
fix(lint): Fixing linting issues
This commit is contained in:
@@ -40,21 +40,21 @@ class AdminLTEPage extends React.Component {
|
||||
_this.BchWallet = BchWallet
|
||||
|
||||
_this.sidebar = [
|
||||
<Item icon="fa-exchange-alt" key="SendReceive" text="Send/Receive" />,
|
||||
<Item icon="fas-coins" key="Tokens" text="Tokens" />,
|
||||
<Item icon="fa-wallet" key="Wallet" text="Wallet" activeOn="/" />,
|
||||
<Item icon="fa-qrcode" key="qrReader" text="Qr Scanner" />,
|
||||
<Item icon="fas-cog" key="Configure" text="Configure" />
|
||||
<Item icon='fa-exchange-alt' key='SendReceive' text='Send/Receive' />,
|
||||
<Item icon='fas-coins' key='Tokens' text='Tokens' />,
|
||||
<Item icon='fa-wallet' key='Wallet' text='Wallet' activeOn='/' />,
|
||||
<Item icon='fa-qrcode' key='qrReader' text='Qr Scanner' />,
|
||||
<Item icon='fas-cog' key='Configure' text='Configure' />
|
||||
]
|
||||
}
|
||||
|
||||
render () {
|
||||
return (
|
||||
<>
|
||||
<AdminLTE title={['FullStack.cash']} titleShort={['PSF']} theme="blue">
|
||||
<AdminLTE title={['FullStack.cash']} titleShort={['PSF']} theme='blue'>
|
||||
<Sidebar.Core>
|
||||
<Item key="Balance" text="Balance" icon="fab-bitcoin">
|
||||
<div className="sidebar-balance">
|
||||
<Item key='Balance' text='Balance' icon='fab-bitcoin'>
|
||||
<div className='sidebar-balance'>
|
||||
<div>
|
||||
<h3>BCH Balance </h3>
|
||||
|
||||
@@ -71,8 +71,8 @@ class AdminLTEPage extends React.Component {
|
||||
<Navbar.Core>
|
||||
<VersionStatus />
|
||||
</Navbar.Core>
|
||||
<Layout path="/">
|
||||
<div className="components-container">
|
||||
<Layout path='/'>
|
||||
<div className='components-container'>
|
||||
{_this.state.section === 'Send/Receive' && (
|
||||
<SendReceive
|
||||
setWalletInfo={_this.props.setWalletInfo}
|
||||
@@ -115,8 +115,8 @@ class AdminLTEPage extends React.Component {
|
||||
<Router>
|
||||
<ScannerModal
|
||||
show={_this.state.showScannerModal}
|
||||
handleOnHide={_this.handleToggleScannerModal}
|
||||
path="/"
|
||||
handleOnHide={_this.onHandleToggleScannerModal}
|
||||
path='/'
|
||||
/>
|
||||
</Router>
|
||||
</>
|
||||
@@ -249,14 +249,14 @@ class AdminLTEPage extends React.Component {
|
||||
addOnClickEventToScanner () {
|
||||
try {
|
||||
const qrScannerEle = document.getElementById('Qr Scanner')
|
||||
qrScannerEle.onclick = () => _this.handleToggleScannerModal()
|
||||
qrScannerEle.onclick = () => _this.onHandleToggleScannerModal()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
}
|
||||
|
||||
// Controller to show the QR scanner
|
||||
handleToggleScannerModal () {
|
||||
onHandleToggleScannerModal () {
|
||||
if (!_this.state.showScannerModal) {
|
||||
_this.hideMenu()
|
||||
}
|
||||
@@ -293,13 +293,14 @@ class AdminLTEPage extends React.Component {
|
||||
)
|
||||
} catch (err) {}
|
||||
}
|
||||
|
||||
getInvisibleMenuItem () {
|
||||
return (
|
||||
<li style={{ display: 'none' }}>
|
||||
{/* Adding this childrens prevents console errors */}
|
||||
<a href="#">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<a href='#'>
|
||||
<span />
|
||||
<span />
|
||||
</a>
|
||||
</li>
|
||||
)
|
||||
|
||||
@@ -53,7 +53,7 @@ class Send extends React.Component {
|
||||
buttonRight={
|
||||
<Button
|
||||
icon='fa-qrcode'
|
||||
onClick={_this.handleToggleScanner}
|
||||
onClick={_this.handleModal}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
@@ -89,8 +89,8 @@ class Send extends React.Component {
|
||||
</Row>
|
||||
<ScannerModal
|
||||
show={_this.state.showScan}
|
||||
handleOnHide={_this.handleToggleScanner}
|
||||
handleOnScan={_this.handleOnScan}
|
||||
handleOnHide={_this.onHandleToggleScanner}
|
||||
handleOnScan={_this.onHandleScan}
|
||||
/>
|
||||
</Content>
|
||||
</>
|
||||
@@ -199,7 +199,13 @@ class Send extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
handleToggleScanner () {
|
||||
onHandleToggleScanner () {
|
||||
_this.setState({
|
||||
showScan: !_this.state.showScan
|
||||
})
|
||||
}
|
||||
|
||||
handleModal () {
|
||||
_this.setState({
|
||||
showScan: !_this.state.showScan
|
||||
})
|
||||
@@ -214,7 +220,7 @@ class Send extends React.Component {
|
||||
addressEle.value = ''
|
||||
}
|
||||
|
||||
handleOnScan (data) {
|
||||
onHandleScan (data) {
|
||||
const validateAdrrs = ['bitcoincash', 'simpleledger']
|
||||
try {
|
||||
_this.resetAddressValue()
|
||||
@@ -240,9 +246,9 @@ class Send extends React.Component {
|
||||
if (!isValid) {
|
||||
throw new Error('It should scan a bch address or slp address')
|
||||
}
|
||||
_this.handleToggleScanner()
|
||||
_this.onHandleToggleScanner()
|
||||
} catch (error) {
|
||||
_this.handleToggleScanner()
|
||||
_this.onHandleToggleScanner()
|
||||
_this.setState({
|
||||
errMsg: error.message
|
||||
})
|
||||
|
||||
@@ -81,7 +81,7 @@ class Tokens extends React.Component {
|
||||
)}
|
||||
<TokenModal
|
||||
token={_this.state.selectedToken ? _this.state.selectedToken : {}}
|
||||
handleOnHide={_this.handleToggleModal}
|
||||
handleOnHide={_this.onHandleToggleModal}
|
||||
show={_this.state.showModal}
|
||||
/>
|
||||
</>
|
||||
@@ -119,10 +119,10 @@ class Tokens extends React.Component {
|
||||
_this.setState({
|
||||
selectedToken
|
||||
})
|
||||
_this.handleToggleModal()
|
||||
_this.onHandleToggleModal()
|
||||
}
|
||||
|
||||
handleToggleModal () {
|
||||
onHandleToggleModal () {
|
||||
_this.setState({
|
||||
showModal: !_this.state.showModal
|
||||
})
|
||||
|
||||
@@ -13,7 +13,7 @@ class TokenModal extends React.Component {
|
||||
|
||||
this.modalFooter = (
|
||||
<>
|
||||
<Button text="Close" pullLeft onClick={this.props.handleOnHide} />
|
||||
<Button text='Close' pullLeft onClick={this.props.handleOnHide} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -32,13 +32,13 @@ class TokenModal extends React.Component {
|
||||
>
|
||||
<Row>
|
||||
<Col sm={12}>
|
||||
<Box className=" border-none ">
|
||||
<Box className=' border-none '>
|
||||
<Row>
|
||||
<Col
|
||||
sm={12}
|
||||
className="text-center tokenModal-info-container"
|
||||
className='text-center tokenModal-info-container'
|
||||
>
|
||||
<Row className="tokenModal-info-content mt-1 text-left">
|
||||
<Row className='tokenModal-info-content mt-1 text-left'>
|
||||
<Col xs={12}>
|
||||
<Row>
|
||||
<Col xs={12} sm={3}>
|
||||
@@ -49,16 +49,16 @@ class TokenModal extends React.Component {
|
||||
</Col>
|
||||
<Col xs={2} sm={1}>
|
||||
<FontAwesomeIcon
|
||||
className="icon btn-animation"
|
||||
size="lg"
|
||||
className='icon btn-animation'
|
||||
size='lg'
|
||||
onClick={() => _this.copyToClipBoard('tokenId')}
|
||||
icon="copy"
|
||||
icon='copy'
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row className="tokenModal-info-content mt-1 text-left">
|
||||
<Row className='tokenModal-info-content mt-1 text-left'>
|
||||
<Col xs={12}>
|
||||
<Row>
|
||||
<Col xs={12} sm={3}>
|
||||
@@ -67,8 +67,8 @@ class TokenModal extends React.Component {
|
||||
<Col xs={12} sm={9}>
|
||||
<a
|
||||
href={`http://${token.url}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
>
|
||||
{token.url}
|
||||
</a>
|
||||
@@ -76,7 +76,7 @@ class TokenModal extends React.Component {
|
||||
</Row>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row className="tokenModal-info-content mt-1 text-left">
|
||||
<Row className='tokenModal-info-content mt-1 text-left'>
|
||||
<Col xs={12}>
|
||||
<Row>
|
||||
<Col xs={12} sm={3}>
|
||||
@@ -88,7 +88,7 @@ class TokenModal extends React.Component {
|
||||
</Row>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row className="tokenModal-info-content mt-1 text-left">
|
||||
<Row className='tokenModal-info-content mt-1 text-left'>
|
||||
<Col xs={12}>
|
||||
<Row>
|
||||
<Col xs={12} sm={3}>
|
||||
@@ -100,7 +100,7 @@ class TokenModal extends React.Component {
|
||||
</Row>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row className="tokenModal-info-content mt-1 text-left">
|
||||
<Row className='tokenModal-info-content mt-1 text-left'>
|
||||
<Col xs={12}>
|
||||
<Row>
|
||||
<Col xs={12} sm={3}>
|
||||
@@ -112,7 +112,7 @@ class TokenModal extends React.Component {
|
||||
</Row>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row className="tokenModal-info-content mt-1 text-left">
|
||||
<Row className='tokenModal-info-content mt-1 text-left'>
|
||||
<Col xs={12}>
|
||||
<Row>
|
||||
<Col xs={12} sm={3}>
|
||||
@@ -124,7 +124,7 @@ class TokenModal extends React.Component {
|
||||
</Row>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row className="tokenModal-info-content mt-1 text-left">
|
||||
<Row className='tokenModal-info-content mt-1 text-left'>
|
||||
<Col xs={12}>
|
||||
<Row>
|
||||
<Col xs={12} sm={3}>
|
||||
|
||||
Reference in New Issue
Block a user