Skip to content

Commit

Permalink
style: fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
steveoh committed Nov 3, 2020
1 parent 8475735 commit f7ac52e
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 30 deletions.
16 changes: 8 additions & 8 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,21 @@ export default class App extends Component {
zoomToGraphic: this.state.zoomToGraphic,
onClick: this.onMapClick,
setView: this.setView
}
};

const sidebarOptions = {
sideBarOpen: this.state.sideBarOpen,
toggleSidebar: this.toggleSidebar
}
};

return (
<div className="app">
<Header title="Atlas Utah" version={version} />
{this.state.showIdentify ?
<IdentifyContainer show={this.showIdentify}>
<IdentifyInformation apiKey={findAddressOptions.apiKey} location={this.state.mapClick} />
</IdentifyContainer>
: null}
<IdentifyContainer show={this.showIdentify}>
<IdentifyInformation apiKey={findAddressOptions.apiKey} location={this.state.mapClick} />
</IdentifyContainer>
: null}
<Sidebar>
<small>Data and services provided by <a href="https://gis.utah.gov/">Utah AGRC</a></small>
<p>Click a location on the map for more information</p>
Expand Down Expand Up @@ -132,11 +132,11 @@ export default class App extends Component {
level: 18
}
});
};
}

onFindAddressError(e) {
console.error(e);
};
}

onMapClick(event) {
this.setState({
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ export default class Header extends PureComponent {
</h1>
{window.innerWidth >= config.MIN_DESKTOP_WIDTH && <img src={logo} className="heading__img" alt="agrc logo" />}
</div>
)
);
}
}
10 changes: 5 additions & 5 deletions src/components/Identify/Identify.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component, PureComponent } from 'react';
import PropTypes from 'prop-types';
import './Identify.css';
import { Container, Col } from 'reactstrap';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons';

import Helpers from '../../Helpers';
Expand Down Expand Up @@ -148,7 +148,7 @@ class IdentifyInformation extends Component {
return (
<Container fluid className="identify">
<Col>
<h4>What's here?</h4>
<h4>What&apos;s here?</h4>
<hr />
</Col>
<Col>
Expand Down Expand Up @@ -305,11 +305,11 @@ class IdentifyInformation extends Component {
const [projection] = await loadModules(['esri/geometry/projection']);
// lat/long coords
console.log("loaded: ", projection.isLoaded());
console.log("supported: ", projection.isSupported())
console.log("supported: ", projection.isSupported());

await projection.load();

console.log(projection.isLoaded())
console.log(projection.isLoaded());

return projection.project(mapPoint, { wkid: srid });
}
Expand All @@ -334,4 +334,4 @@ class IdentifyContainer extends PureComponent {
}
}

export { IdentifyContainer, IdentifyInformation }
export { IdentifyContainer, IdentifyInformation };
2 changes: 1 addition & 1 deletion src/components/MapLens/MapLens.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { PureComponent } from 'react';
import './MapLens.css';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faChevronLeft } from '@fortawesome/free-solid-svg-icons';
import { Button } from 'reactstrap';

Expand Down
2 changes: 1 addition & 1 deletion src/components/Sidebar/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export default class Sidebar extends PureComponent {
{this.props.children}
</div>
</div>
)
);
}
}
22 changes: 11 additions & 11 deletions src/components/dart-board/FindAddress.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import './FindAddress.css';
import { Button, Form, FormGroup, FormText, Label, Input, } from 'reactstrap';
import { Button, Form, FormGroup, FormText, Label, Input } from 'reactstrap';
import { loadModules } from 'esri-loader';
import Helpers from '../../Helpers';

Expand Down Expand Up @@ -50,8 +50,8 @@ export default class FindAddress extends Component {
<FormText color="danger" className={this.state.found ? 'find-address__help-block' : ''}>No match found!</FormText>
</FormGroup>
</Form>
)
};
);
}

async find() {
console.info('FindAddress.find');
Expand All @@ -73,7 +73,7 @@ export default class FindAddress extends Component {
let location = await this.extractResponse(response);

return this.props.onFindAddress(location);
};
}

fetch(options) {
const url = `https://api.mapserv.utah.gov/api/v1/Geocode/${options.street}/${options.zone}?`;
Expand All @@ -89,7 +89,7 @@ export default class FindAddress extends Component {
method: 'GET',
mode: 'cors'
});
};
}

async extractResponse(response) {
if (!response.ok) {
Expand Down Expand Up @@ -125,7 +125,7 @@ export default class FindAddress extends Component {
});

return graphic;
};
}

validate() {
const propsToValidate = ['street', 'zone'];
Expand All @@ -141,15 +141,15 @@ export default class FindAddress extends Component {
this.setState(newState);

return propsToValidate.every(key => newState[key + 'IsValid'] === true);
};
}

handleChange(value, event) {
this.setState({ [value]: event.target.value });
};
}

handleKeyPress = async (event) => {
if (event.key === 'Enter') {
await this.find();
}
};
};
}
}
2 changes: 1 addition & 1 deletion src/components/esrijs/MapView.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default class ReactMapView extends Component {
opacity: 0.3
}],
modules: { LOD, TileInfo, WebTileLayer, Basemap }
}
};

ReactDOM.render(
<LayerSelectorContainer>
Expand Down
2 changes: 1 addition & 1 deletion src/components/esrijs/Print.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ export default class Printer extends Component {
legendLayers: []
}
}]
})
});
}
}
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ export default {
WEB_MERCATOR_WKID: 3857,
MARKER_FILL_COLOR: [130, 65, 47, 0.5],
MARKER_OUTLINE_COLOR: [230, 126, 21, 0.7]
}
};

0 comments on commit f7ac52e

Please sign in to comment.