diff --git a/src/views/Wallet/components/TopNavigationAccount/index.js b/src/views/Wallet/components/TopNavigationAccount/index.js index 94977803..192c1164 100644 --- a/src/views/Wallet/components/TopNavigationAccount/index.js +++ b/src/views/Wallet/components/TopNavigationAccount/index.js @@ -14,6 +14,9 @@ type Props = { router: $ElementType, selectedAccount: $ElementType, }; +type LocalState = { + wrapper: ?HTMLElement, +}; const Wrapper = styled.div` position: relative; @@ -66,9 +69,18 @@ const StyledNavLink = styled(NavLink)` } `; -class TopNavigationAccount extends React.PureComponent { +class TopNavigationAccount extends React.PureComponent { + constructor(props) { + super(props); + this.state = { + wrapper: null, + }; + } + wrapperRefCallback = (element: ?HTMLElement) => { - this.wrapper = element; + this.setState({ + wrapper: element, + }); } wrapper: ?HTMLElement; @@ -89,7 +101,7 @@ class TopNavigationAccount extends React.PureComponent { {network.type === 'ethereum' && Sign & Verify } - this.wrapper} /> + this.state.wrapper} /> ); }