mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Use destructuring assignment (#8093)
* Use destructuring assignment * remove `state` const * Use defaultProps
This commit is contained in:
parent
fcd404015b
commit
54f0830324
@ -10,11 +10,14 @@ export default class AccountPanel extends Component {
|
||||
isFauceting: PropTypes.bool,
|
||||
}
|
||||
|
||||
static defaultProps = {
|
||||
identity: {},
|
||||
account: {},
|
||||
isFauceting: false,
|
||||
}
|
||||
|
||||
render () {
|
||||
const state = this.props
|
||||
const identity = state.identity || {}
|
||||
const account = state.account || {}
|
||||
const isFauceting = state.isFauceting
|
||||
const { identity, account, isFauceting } = this.props
|
||||
|
||||
const panelState = {
|
||||
key: `accountPanel${identity.address}`,
|
||||
|
Loading…
Reference in New Issue
Block a user