summaryrefslogtreecommitdiffhomepage
path: root/app/components/Support.js
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-02-16 14:11:34 +0100
committerAndrej Mihajlov <and@mullvad.net>2018-02-20 17:48:28 +0100
commit2c741a45b85ec334c6c09be01f3062065c998265 (patch)
treedea0731722ebbde98157f2798d3f33c41f2ded08 /app/components/Support.js
parentf58b1790b50abf340d8567b23b329ee9c0c14e3b (diff)
downloadmullvadvpn-2c741a45b85ec334c6c09be01f3062065c998265.tar.xz
mullvadvpn-2c741a45b85ec334c6c09be01f3062065c998265.zip
Fix flow annotations to work on flow v0.66
Diffstat (limited to 'app/components/Support.js')
-rw-r--r--app/components/Support.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/components/Support.js b/app/components/Support.js
index 80116bcc1b..ee1db73d96 100644
--- a/app/components/Support.js
+++ b/app/components/Support.js
@@ -1,5 +1,5 @@
// @flow
-import React from 'react';
+import * as React from 'react';
import { Component, Text, View, TextInput } from 'reactxp';
import { Button, BlueButton, GreenButton, Label } from './styled';
import { Layout, Container } from './Layout';
@@ -14,12 +14,13 @@ export type SupportReport = {
savedReport: ?string,
};
-export type SupportState = {
+type SupportState = {
email: string,
message: string,
savedReport: ?string,
sendState: 'INITIAL' | 'CONFIRM_NO_EMAIL' | 'LOADING' | 'SUCCESS' | 'FAILED',
};
+
export type SupportProps = {
account: AccountReduxState,
onClose: () => void;
@@ -28,14 +29,13 @@ export type SupportProps = {
onSend: (email: string, message: string, savedReport: string) => void;
};
-export default class Support extends Component {
- props: SupportProps;
- state: SupportState = {
+export default class Support extends Component<SupportProps, SupportState> {
+ state = {
email: '',
message: '',
savedReport: null,
sendState: 'INITIAL',
- }
+ };
validate() {
return this.state.message.trim().length > 0;
@@ -57,7 +57,7 @@ export default class Support extends Component {
});
}
- _getLog() {
+ _getLog(): Promise<string> {
const toRedact = [];
if (this.props.account.accountToken) {
toRedact.push(this.props.account.accountToken.toString());