Skip to content

Commit

Permalink
refactor: add taxpayer to tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
pjsier committed Nov 9, 2024
1 parent cb19a36 commit bcfb648
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
17 changes: 2 additions & 15 deletions client/src/components/Map/Map.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,24 +256,10 @@ class PraxisMap extends Component {
)
}

_renderTooltip() {
// TODO: Move to use mapbox native tooltip, performance on this is too rough
const { hoveredFeature, x, y } = this.props.currentFeature

return (
hoveredFeature && (
<div className="tooltip" style={{ left: x, top: y }}>
<div>{hoveredFeature.properties.propaddr}</div>
<div>Speculator: {hoveredFeature.properties.own_id}</div>
<div>Properties owned: {hoveredFeature.properties.count}</div>
</div>
)
)
}

_removeTooltip() {
this.props.dispatch(getHoveredFeatureAction(null))
}

// add a new marker if user clicks on a parcel feature
// nothing happens if there is no feature
_handleMapClick = async (event) => {
Expand Down Expand Up @@ -442,6 +428,7 @@ class PraxisMap extends Component {
<div className="tooltip">
<div>{hoveredFeature.properties.propaddr}</div>
<div>Speculator: {hoveredFeature.properties.own_id}</div>
<div>Taxpayer: {hoveredFeature.properties.taxpayer}</div>
<div>
Properties owned: {hoveredFeature.properties.own_count}
</div>
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Search/DetailedSearchResults.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ function SingleParcel(props) {
Detroit zip code <span>{propzip}</span>, and was one of{" "}
<span>{count}</span> properties owned by speculator{" "}
<span>{capitalizeFirstLetter(own_id)}</span>. Additional years of
speculation for this property ocurred in{" "}
speculation for this property occurred in{" "}
<span>
{praxisRecordYears ? praxisRecordYears.join(", ") : null}
</span>
Expand Down

0 comments on commit bcfb648

Please sign in to comment.