mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-09 23:51:05 +00:00
remove dead code
This commit is contained in:
parent
0a0d1e7715
commit
6db7aada27
@ -2,7 +2,6 @@
|
|||||||
import React, { PureComponent } from 'react';
|
import React, { PureComponent } from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import TrezorConnect from 'trezor-connect';
|
import TrezorConnect from 'trezor-connect';
|
||||||
import type { TrezorDevice } from 'flowtype';
|
|
||||||
import Button from 'components/Button';
|
import Button from 'components/Button';
|
||||||
import * as deviceUtils from 'utils/device';
|
import * as deviceUtils from 'utils/device';
|
||||||
import MenuItems from './components/MenuItems';
|
import MenuItems from './components/MenuItems';
|
||||||
@ -22,11 +21,6 @@ const StyledButton = styled(Button)`
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
type DeviceMenuItem = {
|
|
||||||
type: string;
|
|
||||||
label: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
class DeviceMenu extends PureComponent<Props> {
|
class DeviceMenu extends PureComponent<Props> {
|
||||||
constructor(props: Props) {
|
constructor(props: Props) {
|
||||||
super(props);
|
super(props);
|
||||||
@ -50,19 +44,6 @@ class DeviceMenu extends PureComponent<Props> {
|
|||||||
window.removeEventListener('mousedown', this.mouseDownHandler, false);
|
window.removeEventListener('mousedown', this.mouseDownHandler, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
onDeviceMenuClick(item: DeviceMenuItem, device: TrezorDevice): void {
|
|
||||||
if (item.type === 'reload') {
|
|
||||||
this.props.acquireDevice();
|
|
||||||
} else if (item.type === 'forget') {
|
|
||||||
this.props.forgetDevice(device);
|
|
||||||
} else if (item.type === 'clone') {
|
|
||||||
this.props.duplicateDevice(device);
|
|
||||||
} else if (item.type === 'settings') {
|
|
||||||
this.props.toggleDeviceDropdown(false);
|
|
||||||
this.props.gotoDeviceSettings(device);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
blurHandler(): void {
|
blurHandler(): void {
|
||||||
this.props.toggleDeviceDropdown(false);
|
this.props.toggleDeviceDropdown(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user