Navigate to a parcel from an URL using only the parcel ID without the coordinates.
Issue
fixes #408
Checklist:
[x] My commit message follows the Conventional Commits specification
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have tested my code
[x] My changes generate no new warnings
[x] My PR is rebased off the most recent develop branch
[x] My PR is opened against the develop branch
Additional comments
The useParcelNavigation custom hook takes an optional parcelId argument and returns some functions used to resolve the ID to GPS coordinates and to navigate to the parcel.
This replaces the current way to do parcel navigation from the modals allowing us to imperatively call Mapbox's flyTo from the event handler and avoid some rerender caused by setState and useEffect.
Description
Navigate to a parcel from an URL using only the parcel ID without the coordinates.
Issue
fixes #408
Checklist:
develop
branchdevelop
branchAdditional comments
The
useParcelNavigation
custom hook takes an optionalparcelId
argument and returns some functions used to resolve the ID to GPS coordinates and to navigate to the parcel. This replaces the current way to do parcel navigation from the modals allowing us to imperatively call Mapbox'sflyTo
from the event handler and avoid some rerender caused bysetState
anduseEffect
.Alert Reviewers
@codynhat @gravenp