fix(menu): Rearranging menu items

This commit is contained in:
Chris Troutner
2020-09-21 14:11:55 -07:00
parent f5dccdf3dc
commit 6e550a05ac
5 changed files with 44 additions and 36 deletions
+1 -1
View File
@@ -49,8 +49,8 @@ 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' activeOn='/' />,
<Item icon='fa-exchange-alt' key='SendReceive' text='Send/Receive' />,
<Item icon='fa-wallet' key='Wallet' text='Wallet' />,
<Item icon='fa-qrcode' key='qrReader' text='Qr Scanner' />,
<Item icon='fas-cog' key='Configure' text='Configure' />
+1 -2
View File
@@ -142,7 +142,7 @@ class Tokens extends React.Component {
await bchWallet.walletInfoPromise
if(_this.props.tokensInfo.length > 0 && refresh === null) {
if (_this.props.tokensInfo.length > 0 && refresh === null) {
tokens = _this.props.tokensInfo
} else {
tokens = await bchWallet.listTokens()
@@ -157,7 +157,6 @@ class Tokens extends React.Component {
})
_this.props.setTokensInfo(tokens)
} catch (error) {
_this.handleError(error)
}
+40 -31
View File
@@ -22,13 +22,24 @@ class Footer extends React.Component {
}
async componentDidMount () {
const addr = 'bitcoincash:qq8mk8etntclfdkny2aknh4ylc0uaewalszh5eytnr'
const hash = await memoGet.read(addr)
console.log(`hash: ${hash}`)
this.setState({
ipfsHash: hash,
ipfsHashLink: `https://ipfs-gateway.fullstack.cash/ipfs/${hash}`
})
try {
const addr = 'bitcoincash:qq8mk8etntclfdkny2aknh4ylc0uaewalszh5eytnr'
const hash = await memoGet.read(addr)
console.log(`hash: ${hash}`)
this.setState({
ipfsHash: hash,
ipfsHashLink: `https://ipfs-gateway.fullstack.cash/ipfs/${hash}`
})
} catch (err) {
console.error('Error trying to retrieve IPFS hash for the site: ', err)
// Manually set an old hash.
const hash = 'QmVm1y1MX4YPzmgQiAafY96Pq7j6GTNMFNuvHki1jAwxYg'
this.setState({
ipfsHash: hash,
ipfsHashLink: `https://ipfs-gateway.fullstack.cash/ipfs/${hash}`
})
}
// const bchjs = new BCHJS()
// const balance = await bchjs.Blockbook.balance(addr)
@@ -37,68 +48,66 @@ class Footer extends React.Component {
render () {
return (
<section id='footer'>
<Row className='footer-container'>
<Col md={5} className='footer-section'>
<section id="footer">
<Row className="footer-container">
<Col md={5} className="footer-section">
<Row>
<Col md={12} className='mb-1'>
<p className='section-tittle'>Produced By</p>
<Col md={12} className="mb-1">
<p className="section-tittle">Produced By</p>
<a
href='https://psfoundation.cash/'
target='_blank'
rel='noopener noreferrer'
href="https://psfoundation.cash/"
target="_blank"
rel="noopener noreferrer"
>
Permissionless Software Foundation
</a>
</Col>
<Col md={12}>
<p className='section-tittle'>Source Code</p>
<FontAwesomeIcon className='' size='lg' icon={faGithub} />
<p className="section-tittle">Source Code</p>
<FontAwesomeIcon className="" size="lg" icon={faGithub} />
<a
href='https://github.com/Permissionless-Software-Foundation/gatsby-ipfs-web-wallet'
target='_blank'
rel='noopener noreferrer'
href="https://github.com/Permissionless-Software-Foundation/gatsby-ipfs-web-wallet"
target="_blank"
rel="noopener noreferrer"
>
Github
</a>
</Col>
</Row>
</Col>
<Col md={7} className='footer-section'>
<div className='pull-right'>
<span className='section-tittle'>
<Col md={7} className="footer-section">
<div className="pull-right">
<span className="section-tittle">
Ways to access this web-app
</span>
<ul>
<li id='web'>
<li id="web">
<span>
<b>Web</b>
</span>
<b>|</b>
<a href='https://wallet.fullstack.cash'>
<a href="https://wallet.fullstack.cash">
wallet.fullstack.cash
</a>
</li>
<li id='tor'>
<li id="tor">
<span>
<b>Tor</b>
</span>
<b>|</b>
<a href='http://puh2fyj2ly5b4p5m.onion/'>
<a href="http://puh2fyj2ly5b4p5m.onion/">
puh2fyj2ly5b4p5m.onion
</a>
</li>
<li id='ipfs'>
<li id="ipfs">
<span>
<b>IPFS</b>
</span>
<b>|</b>
<a href={_this.state.ipfsHashLink}>
{this.state.ipfsHash}
</a>
<a href={_this.state.ipfsHashLink}>{this.state.ipfsHash}</a>
</li>
</ul>
</div>
+1 -1
View File
@@ -19,7 +19,7 @@ const mapDispatchToProps = dispatch => {
return {
setWalletInfo: value => dispatch({ type: 'SET_WALLET_INFO', value }),
updateBalance: value => dispatch({ type: 'UPDATE_BALANCE', value }),
setBchWallet: value => dispatch({ type: 'SET_BCH_WALLET', value }),
setBchWallet: value => dispatch({ type: 'SET_BCH_WALLET', value }),
setTokensInfo: value => dispatch({ type: 'SET_TOKENS_INFO', value })
}
}
+1 -1
View File
@@ -47,7 +47,7 @@ const reducer = (state, action) => {
})
}
// Get or update tokens information
// Get or update tokens information
if (action.type === 'SET_TOKENS_INFO') {
return Object.assign({}, state, {
tokensInfo: action.value