summaryrefslogtreecommitdiffhomepage
path: root/app/components/Connect.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/components/Connect.js')
-rw-r--r--app/components/Connect.js11
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