Pass a key prop to ParcelInfo to tell react to render a different component every time selectedParcelId change instead of rerender the same component with different props and same state, otherwise when the user change the selected parcel the custom hook that returns the parcel content is not triggered until the license owner address is fetched from the subgraph, causing the parcel info panel to show stale data until parcelContent is updated.
Issue
fixes #364
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
Wait for useBasicProfile to return before showing the parcel name to avoid briefly displaying the fallback info instead of the name when a basic profile is present.
Description
Pass a
key
prop toParcelInfo
to tell react to render a different component every timeselectedParcelId
change instead of rerender the same component with different props and same state, otherwise when the user change the selected parcel the custom hook that returns the parcel content is not triggered until the license owner address is fetched from the subgraph, causing the parcel info panel to show stale data untilparcelContent
is updated.Issue
fixes #364
Checklist:
develop
branchdevelop
branchAdditional comments
Wait for
useBasicProfile
to return before showing the parcel name to avoid briefly displaying the fallback info instead of the name when a basic profile is present.Alert Reviewers
@codynhat @gravenp