diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2021-07-23 13:39:34 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2021-07-23 13:39:34 +0200 |
| commit | c2acb4aff58b7b7f60a13ab05104910f70741e3c (patch) | |
| tree | bc8bcac2c7386aa2522c89223aba4471cfb27820 /gui/src/renderer/components | |
| parent | d0951f1f9ae8d0c6be9c4aa961a257c97ddbf4f5 (diff) | |
| parent | f5f870074496283521d6adcc80537a54e2168c8e (diff) | |
| download | mullvadvpn-c2acb4aff58b7b7f60a13ab05104910f70741e3c.tar.xz mullvadvpn-c2acb4aff58b7b7f60a13ab05104910f70741e3c.zip | |
Merge branch 'fix-linter-warnings'
Diffstat (limited to 'gui/src/renderer/components')
| -rw-r--r-- | gui/src/renderer/components/AdvancedSettings.tsx | 19 | ||||
| -rw-r--r-- | gui/src/renderer/components/Login.tsx | 3 | ||||
| -rw-r--r-- | gui/src/renderer/components/SplitTunnelingSettings.tsx | 3 | ||||
| -rw-r--r-- | gui/src/renderer/components/SvgMap.tsx | 3 |
4 files changed, 11 insertions, 17 deletions
diff --git a/gui/src/renderer/components/AdvancedSettings.tsx b/gui/src/renderer/components/AdvancedSettings.tsx index 62232b6b8c..338a4d5b81 100644 --- a/gui/src/renderer/components/AdvancedSettings.tsx +++ b/gui/src/renderer/components/AdvancedSettings.tsx @@ -8,7 +8,6 @@ import { TunnelProtocol, } from '../../shared/daemon-rpc-types'; import { messages } from '../../shared/gettext'; -import consumePromise from '../../shared/promise'; import { IpAddress } from '../lib/ip'; import { WgKeyState } from '../redux/settings/reducers'; import { @@ -599,7 +598,7 @@ export default class AdvancedSettings extends React.Component<IProps, IState> { }; private confirmPublicDnsAddress = () => { - consumePromise(this.addDnsAddress(this.state.publicDnsIpToConfirm!, true)); + void this.addDnsAddress(this.state.publicDnsIpToConfirm!, true); this.hideCustomDnsConfirmationDialog(); }; @@ -627,15 +626,13 @@ export default class AdvancedSettings extends React.Component<IProps, IState> { private removeDnsAddress = (address: string) => { const addresses = this.props.dns.customOptions.addresses.filter((item) => item !== address); - consumePromise( - this.props.setDnsOptions({ - ...this.props.dns, - state: addresses.length > 0 && this.props.dns.state === 'custom' ? 'custom' : 'default', - customOptions: { - addresses, - }, - }), - ); + void this.props.setDnsOptions({ + ...this.props.dns, + state: addresses.length > 0 && this.props.dns.state === 'custom' ? 'custom' : 'default', + customOptions: { + addresses, + }, + }); }; private tunnelProtocolItems = ( diff --git a/gui/src/renderer/components/Login.tsx b/gui/src/renderer/components/Login.tsx index 4198bcb9dd..96d3929fe0 100644 --- a/gui/src/renderer/components/Login.tsx +++ b/gui/src/renderer/components/Login.tsx @@ -1,7 +1,6 @@ import React, { useCallback } from 'react'; import { sprintf } from 'sprintf-js'; import { colors } from '../../config.json'; -import consumePromise from '../../shared/promise'; import { messages } from '../../shared/gettext'; import { formatAccountToken } from '../lib/account'; import Accordion from './Accordion'; @@ -217,7 +216,7 @@ export default class Login extends React.Component<IProps, IState> { }; private onClearAccountHistory = () => { - consumePromise(this.clearAccountHistory()); + void this.clearAccountHistory(); }; private async clearAccountHistory() { diff --git a/gui/src/renderer/components/SplitTunnelingSettings.tsx b/gui/src/renderer/components/SplitTunnelingSettings.tsx index 30948dae35..1b41a6683d 100644 --- a/gui/src/renderer/components/SplitTunnelingSettings.tsx +++ b/gui/src/renderer/components/SplitTunnelingSettings.tsx @@ -4,7 +4,6 @@ import { sprintf } from 'sprintf-js'; import { colors } from '../../config.json'; import { messages } from '../../shared/gettext'; import { IApplication, ILinuxSplitTunnelingApplication } from '../../shared/application-types'; -import consumePromise from '../../shared/promise'; import { useAppContext } from '../context'; import { useHistory } from '../lib/history'; import { useAsyncEffect } from '../lib/utilityHooks'; @@ -142,7 +141,7 @@ function LinuxSplitTunnelingSettings(props: IPlatformSplitTunnelingSettingsProps const [applications, setApplications] = useState<ILinuxSplitTunnelingApplication[]>(); const [browseError, setBrowseError] = useState<string>(); - useEffect(() => consumePromise(getLinuxSplitTunnelingApplications().then(setApplications)), []); + useEffect(() => void getLinuxSplitTunnelingApplications().then(setApplications), []); const launchApplication = useCallback( async (application: ILinuxSplitTunnelingApplication | string) => { diff --git a/gui/src/renderer/components/SvgMap.tsx b/gui/src/renderer/components/SvgMap.tsx index 93b3b7fdc3..cae3c68ed6 100644 --- a/gui/src/renderer/components/SvgMap.tsx +++ b/gui/src/renderer/components/SvgMap.tsx @@ -226,8 +226,7 @@ function SvgMap(props: IProps) { style={mapStyle} projection={ // Workaround for incorrect type definition in @types/react-simple-maps. - /* @ts-ignore */ - projection as () => GeoProjection + (projection as unknown) as () => GeoProjection } projectionConfig={projectionConfig}> <ZoomableGroup |
