Skip to content

Commit

Permalink
Speed fixes (patch)
Browse files Browse the repository at this point in the history
  • Loading branch information
maccyber committed Jun 16, 2018
1 parent a15f070 commit 60c4ee8
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions components/Map.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { geolocated } from 'react-geolocated'
import { Component, Fragment } from 'react'
import getConfig from 'next/config'
import ReactMapGL, { Marker, Popup } from 'react-map-gl'
Expand Down Expand Up @@ -51,7 +50,7 @@ const Markers = ({ popupInfo, data }) => {
)
}

class Map extends Component {
export default class Map extends Component {
constructor (props) {
super(props)
const latitude = props.coords && props.coords.latitude ? props.coords.latitude : 62.6321649
Expand Down Expand Up @@ -85,7 +84,7 @@ class Map extends Component {

async tick () {
try {
const { stations: data } = await getData()
const { stations: data } = await getData(URL_STATIONS)
this.setState({ data, error: false })
} catch (error) {
console.log(error)
Expand Down Expand Up @@ -154,10 +153,3 @@ class Map extends Component {
)
}
}

export default geolocated({
positionOptions: {
enableHighAccuracy: false
},
userDecisionTimeout: 5000
})(Map)

0 comments on commit 60c4ee8

Please sign in to comment.