From 54f083032451cf79286d4e42ab5cded60f39d28f Mon Sep 17 00:00:00 2001 From: ricky Date: Mon, 24 Feb 2020 14:38:41 -0500 Subject: [PATCH] Use destructuring assignment (#8093) * Use destructuring assignment * remove `state` const * Use defaultProps --- ui/app/components/app/account-panel.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ui/app/components/app/account-panel.js b/ui/app/components/app/account-panel.js index 21ee01aa9..36517f474 100644 --- a/ui/app/components/app/account-panel.js +++ b/ui/app/components/app/account-panel.js @@ -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}`,