diff --git a/src/js/routes/Settings/Location.jsx b/src/js/routes/Settings/Location.jsx index 808e35964..6c074184a 100644 --- a/src/js/routes/Settings/Location.jsx +++ b/src/js/routes/Settings/Location.jsx @@ -1,18 +1,18 @@ -import React, { Component } from 'react'; -import { Button, ButtonToolbar } from 'react-bootstrap'; -import HeaderBackNavigation from '../../components/Navigation/HeaderBackNavigation'; -import VoterStore from '../../stores/VoterStore'; +import React, { Component } from "react"; +import { Button, ButtonToolbar } from "react-bootstrap"; +import HeaderBackNavigation from "../../components/Navigation/HeaderBackNavigation"; +import VoterStore from "../../stores/VoterStore"; export default class Location extends Component { - constructor(props) { + constructor (props) { super(props); - this.state = {} + this.state = {}; } - componentDidMount() { - VoterStore.getLocation( location => { + componentDidMount () { + VoterStore.getLocation( (err, location) => { this.setState({ location }); - }) + }); } updateLocation (e) { @@ -21,49 +21,47 @@ export default class Location extends Component { }); } - saveLocation (e) { + saveLocation () { var { location } = this.state; - VoterStore.saveLocation ( location, (err, location) => { + VoterStore.saveLocation( location, (err) => { if (err) return console.error(err); - window.location.href="/ballot" + window.location.href = "/ballot"; }); } - render() { + render () { var { location } = this.state; - return ( -