feat(button): Added clear localstorage button

This commit is contained in:
Daniel Gonzalez
2020-07-28 00:36:14 -04:00
parent 075876e1c5
commit 66a8657e4b
@@ -4,6 +4,7 @@ import { Content, Row, Col, Box, Inputs, Button } from 'adminlte-2-react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
// import BchWallet from 'minimal-slp-wallet'
import Servers from './servers'
import { setWalletInfo } from '../../localWallet'
const { Text } = Inputs
const BchWallet =
@@ -66,6 +67,12 @@ class Configure extends React.Component {
FullStack.cash
</a>
</p>
<Button
text='Clear LocalStorage'
type='primary'
className='btn-lg mt-1'
onClick={_this.handleClearLocalStorage}
/>
</Box>
</Col>
</Row>
@@ -118,6 +125,12 @@ class Configure extends React.Component {
)
}
// Clear localstorage info
handleClearLocalStorage () {
setWalletInfo({})
window.location.reload()
}
componentDidMount () {
_this.setJwt()
}