diff --git a/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js b/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js index ebb60c1a..de9e4900 100644 --- a/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js +++ b/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js @@ -14,15 +14,10 @@ import l10nCommonMessages from 'views/common.messages'; import MenuItems from './components/MenuItems'; import DeviceList from './components/DeviceList'; -import type { Props as BaseProps } from '../common'; +import type { Props } from '../common'; import Divider from '../Divider'; -type OwnProps = { - overlayHeight: number, -}; -type Props = BaseProps & OwnProps; - const Wrapper = styled.div` position: absolute; z-index: 1; @@ -37,7 +32,7 @@ const Wrapper = styled.div` const Overlay = styled.div` position: absolute; width: 100%; - height: ${props => `${props.height}px`}; + height: 100%; background: rgba(0, 0, 0, 0.2); animation: ${FADE_IN} 0.25s; `; @@ -156,7 +151,6 @@ class DeviceMenu extends PureComponent { onClick={() => { toggleDeviceDropdown(!dropdownOpened); }} - height={this.props.overlayHeight} /> ); diff --git a/src/views/Wallet/components/LeftNavigation/index.js b/src/views/Wallet/components/LeftNavigation/index.js index 1b963ed1..b45e8b09 100644 --- a/src/views/Wallet/components/LeftNavigation/index.js +++ b/src/views/Wallet/components/LeftNavigation/index.js @@ -163,21 +163,18 @@ type State = { animationType: ?string, clicked: boolean, bodyMinHeight: number, - bodyHeight: number, }; class LeftNavigation extends React.PureComponent { constructor(props: Props) { super(props); this.deviceMenuRef = React.createRef(); - this.leftMenuBodyRef = React.createRef(); const { location } = this.props.router; const hasNetwork = location && location.state && location.state.network; this.state = { animationType: hasNetwork ? 'slide-left' : null, clicked: false, bodyMinHeight: 0, - bodyHeight: 0, }; } @@ -234,17 +231,10 @@ class LeftNavigation extends React.PureComponent { bodyMinHeight: this.deviceMenuRef.current.getMenuHeight(), }); } - if (this.leftMenuBodyRef.current) { - this.setState({ - bodyHeight: this.leftMenuBodyRef.current.getBoundingClientRect().height, - }); - } } deviceMenuRef: { current: any }; - leftMenuBodyRef: { current: any }; - render() { const { props } = this; let menu; @@ -376,14 +366,8 @@ class LeftNavigation extends React.PureComponent { } {...this.props} /> - - {dropdownOpened && ( - - )} + + {dropdownOpened && } {isDeviceAccessible && menu}