From 740661b4c623ec01979ddde29f3a71548448526f Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Wed, 16 Jan 2019 10:43:38 +0100 Subject: [PATCH] move forget device menu item to the bottom --- .../DeviceMenu/components/MenuItems/index.js | 44 ++++++++----------- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.js b/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.js index 53fc615b..1d1d3235 100644 --- a/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.js +++ b/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.js @@ -27,19 +27,6 @@ const Label = styled.div` `; class MenuItems extends PureComponent { - onDeviceMenuClick(action, device) { - if (action === 'reload') { - this.props.acquireDevice(); - } else if (action === 'forget') { - this.props.forgetDevice(device); - } else if (action === 'clone') { - this.props.duplicateDevice(device); - } else if (action === 'settings') { - this.props.toggleDeviceDropdown(false); - this.props.gotoDeviceSettings(device); - } - } - showDeviceMenu() { const { device } = this.props; return device && device.mode === 'normal'; @@ -55,9 +42,14 @@ class MenuItems extends PureComponent { render() { if (!this.showDeviceMenu()) return null; + const { device } = this.props; return ( - {/* this.onDeviceMenuClick('settings', this.props.device)}> + {/* { + this.props.toggleDeviceDropdown(false); + this.props.gotoDeviceSettings(device); + }} + > */} - this.onDeviceMenuClick('forget', this.props.device)}> - - - {this.showClone() && ( - this.onDeviceMenuClick('clone', this.props.device)}> + this.props.duplicateDevice(device)}> this.onDeviceMenuClick('reload')} + onClick={() => this.props.acquireDevice()} > )} + this.props.forgetDevice(device)}> + + + ); } @@ -101,8 +93,8 @@ MenuItems.propTypes = { acquireDevice: PropTypes.func.isRequired, forgetDevice: PropTypes.func.isRequired, duplicateDevice: PropTypes.func.isRequired, - toggleDeviceDropdown: PropTypes.func.isRequired, - gotoDeviceSettings: PropTypes.func.isRequired, + // toggleDeviceDropdown: PropTypes.func.isRequired, + // gotoDeviceSettings: PropTypes.func.isRequired, }; export default MenuItems; \ No newline at end of file