Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ryancoughlin committed Apr 8, 2017
1 parent be2ba3d commit 037cc57
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions app/components/station-detail/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,16 @@ const StationDetail = class extends Component {
}

requestLoctionInformation() {
if (this.props.location) {
this.props.fetchTideData(this.props.location)
this.props.findCityName(this.props.location)
const { location, fetchTideData, findCityName } = this.props

if (location) {
fetchTideData(location)
findCityName(location)
} else {
this.findCurrentLocation()
fetchLocation().then((location) => {
fetchTideData(location)
findCityName(location)
})
}
}

Expand Down

0 comments on commit 037cc57

Please sign in to comment.