diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-02-21 10:45:11 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-02-21 10:45:11 +0100 |
| commit | de737c54c413f96c35b4e9bc6280fc7d26e4fa83 (patch) | |
| tree | 0cf470c59b4c7c8a6327e64610f68f5facd78d6d /app/components/Connect.js | |
| parent | ae9c255b3ecdec341090c932db6cb261147a7382 (diff) | |
| parent | 1214138633bcca19a1b96622400f3fbcf4044bd9 (diff) | |
| download | mullvadvpn-de737c54c413f96c35b4e9bc6280fc7d26e4fa83.tar.xz mullvadvpn-de737c54c413f96c35b4e9bc6280fc7d26e4fa83.zip | |
Merge branch 'update-flow'
Diffstat (limited to 'app/components/Connect.js')
| -rw-r--r-- | app/components/Connect.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/app/components/Connect.js b/app/components/Connect.js index 1c1a4bac1e..3408e40b8d 100644 --- a/app/components/Connect.js +++ b/app/components/Connect.js @@ -1,7 +1,7 @@ // @flow import moment from 'moment'; -import React, { Component } from 'react'; +import * as React from 'react'; import { Layout, Container, Header } from './Layout'; import { BackendError } from '../lib/backend'; import Map from './Map'; @@ -29,14 +29,13 @@ type ConnectState = { mapOffset: [number, number], }; -export default class Connect extends Component { - props: ConnectProps; - state: ConnectState = { +export default class Connect extends React.Component<ConnectProps, ConnectState> { + state = { showCopyIPMessage: false, mapOffset: [0, 0], }; - _copyTimer: ?number; + _copyTimer: ?TimeoutID; shouldComponentUpdate(nextProps: ConnectProps, nextState: ConnectState) { const { connection: prevConnection, ...otherPrevProps } = this.props; @@ -130,7 +129,7 @@ export default class Connect extends Component { } } - _updateMapOffset = (spinnerNode: HTMLElement) => { + _updateMapOffset = (spinnerNode: ?HTMLElement) => { if(spinnerNode) { // calculate the vertical offset from the center of the map // to shift the center of the map upwards to align the centers |
