Merge pull request #98 from Permissionless-Software-Foundation/feature/noWalletRedirect

feat(admin-lte): Set wallet section as default if no wallet exists
This commit is contained in:
Chris Troutner
2020-11-09 12:02:31 -08:00
committed by GitHub
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "gatsby-ipfs-web-wallet",
"description": "A gatsbyjs app with adminlte2 integration and basic Bitcoin Cash wallet functionality.",
"description": "A GatsbyJS Theme with AdminLTE integration and basic Bitcoin Cash wallet functionality.",
"version": "1.9.13",
"main": "index.js",
"author": "Chris Troutner <chris.troutner@gmail.com>",
+4 -1
View File
@@ -48,7 +48,10 @@ class AdminLTEPage extends React.Component {
// the state to avoid 'setState()' errors inside render()
_this.activedItem = ''
_this.menuLoaded = false
_this.defaultSection = 'Tokens'
/* If no wallet exists the default section will be 'Wallet' */
const { mnemonic } = _this.props.walletInfo
_this.defaultSection = mnemonic ? 'Tokens' : 'Wallet'
}
render () {