diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-09-26 19:00:57 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-09-27 15:43:44 +0200 |
| commit | 977eedeca4edf9e5836ea407bf61ba1a59b054d1 (patch) | |
| tree | b44b8c545ad37c2b399809db274009f0efec01f5 | |
| parent | e830dad2b1e00a2ef46382dfe71c80b0406686e8 (diff) | |
| download | mullvadvpn-977eedeca4edf9e5836ea407bf61ba1a59b054d1.tar.xz mullvadvpn-977eedeca4edf9e5836ea407bf61ba1a59b054d1.zip | |
Fix flow issues and drop unused testName props
| -rw-r--r-- | gui/packages/desktop/src/main/index.js | 2 | ||||
| -rw-r--r-- | gui/packages/desktop/src/renderer/components/Connect.js | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/gui/packages/desktop/src/main/index.js b/gui/packages/desktop/src/main/index.js index 3b9a04d7f8..c28477652e 100644 --- a/gui/packages/desktop/src/main/index.js +++ b/gui/packages/desktop/src/main/index.js @@ -47,7 +47,7 @@ const ApplicationMain = { _ensureSingleInstance() { if (app.requestSingleInstanceLock()) { - app.on('second-instance', (event, commandLine, workingDirectory) => { + app.on('second-instance', (_event, _commandLine, _workingDirectory) => { if (this._windowController) { this._windowController.show(); } diff --git a/gui/packages/desktop/src/renderer/components/Connect.js b/gui/packages/desktop/src/renderer/components/Connect.js index 29d7ccc8e1..9fc7a7de61 100644 --- a/gui/packages/desktop/src/renderer/components/Connect.js +++ b/gui/packages/desktop/src/renderer/components/Connect.js @@ -2,7 +2,7 @@ import moment from 'moment'; import * as React from 'react'; -import { Component, Text, View } from 'reactxp'; +import { Component, Text, View, Types } from 'reactxp'; import { Accordion, ClipboardLabel, SecuredLabel, SecuredDisplayStyle } from '@mullvad/components'; import { Layout, Container, Header } from './Layout'; import { SettingsBarButton, Brand } from './HeaderBar'; @@ -56,7 +56,7 @@ export default class Connect extends Component<Props> { return ( <Layout> - <Header barStyle={this.headerBarStyle()} testName="header"> + <Header barStyle={this.headerBarStyle()}> <Brand /> <SettingsBarButton onPress={this.props.onSettings} /> </Header> @@ -251,12 +251,12 @@ export class TunnelBanner extends Component<TunnelBannerProps, TunnerBannerState subtitle: '', }; - constructor(props) { + constructor(props: TunnelBannerProps) { super(); this.state = this._deriveState(props.tunnelState); } - componentDidUpdate(oldProps, _oldState) { + componentDidUpdate(oldProps: TunnelBannerProps, _oldState: TunnerBannerState) { if ( oldProps.tunnelState.state !== this.props.tunnelState.state || oldProps.tunnelState.details !== this.props.tunnelState.details @@ -311,6 +311,7 @@ type TunnelControlProps = { onConnect: () => void, onDisconnect: () => void, onSelectLocation: () => void, + style: Types.ViewStyleRuleSet, }; export function TunnelControl(props: TunnelControlProps) { @@ -338,27 +339,26 @@ export function TunnelControl(props: TunnelControlProps) { const SelectedLocation = () => ( <AppButton.TransparentButton style={styles.switch_location_button} - onPress={props.onSelectLocation} - testName={'SelectedLocation'}> + onPress={props.onSelectLocation}> <AppButton.Label>{props.selectedRelayName}</AppButton.Label> <Img height={12} width={7} source="icon-chevron" /> </AppButton.TransparentButton> ); const Connect = () => ( - <AppButton.GreenButton onPress={props.onConnect} testName="secureConnection"> + <AppButton.GreenButton onPress={props.onConnect}> {'Secure my connection'} </AppButton.GreenButton> ); const Disconnect = () => ( - <AppButton.RedTransparentButton onPress={props.onDisconnect} testName="disconnect"> + <AppButton.RedTransparentButton onPress={props.onDisconnect}> {'Disconnect'} </AppButton.RedTransparentButton> ); const Cancel = () => ( - <AppButton.RedTransparentButton onPress={props.onDisconnect} testName="cancel"> + <AppButton.RedTransparentButton onPress={props.onDisconnect}> {'Cancel'} </AppButton.RedTransparentButton> ); |
