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/Map.js | |
| parent | ae9c255b3ecdec341090c932db6cb261147a7382 (diff) | |
| parent | 1214138633bcca19a1b96622400f3fbcf4044bd9 (diff) | |
| download | mullvadvpn-de737c54c413f96c35b4e9bc6280fc7d26e4fa83.tar.xz mullvadvpn-de737c54c413f96c35b4e9bc6280fc7d26e4fa83.zip | |
Merge branch 'update-flow'
Diffstat (limited to 'app/components/Map.js')
| -rw-r--r-- | app/components/Map.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/app/components/Map.js b/app/components/Map.js index d416b77961..3865e8975a 100644 --- a/app/components/Map.js +++ b/app/components/Map.js @@ -1,6 +1,6 @@ // @flow -import React from 'react'; +import * as React from 'react'; import { Component, View } from 'reactxp'; import SvgMap from './SvgMap'; @@ -21,11 +21,8 @@ type MapState = { } }; -export default class Map extends Component { - - props: MapProps; - - state: MapState = { +export default class Map extends Component<MapProps, MapState> { + state = { bounds: { width: 0, height: 0, @@ -84,6 +81,8 @@ export default class Map extends Component { case 'high': return 1; case 'medium': return 20; case 'low': return 40; + default: + throw new Error(`Invalid enumeration type: ${variant}`); } } @@ -93,6 +92,8 @@ export default class Map extends Component { return './assets/images/location-marker-secure.svg'; case 'unsecure': return './assets/images/location-marker-unsecure.svg'; + default: + throw new Error(`Invalid enumeration type: ${style}`); } } |
