-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: [DHIS2-6335] use custom map center point #3312
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Nice, change the query key (see comment) and let's get this one in.
(We should probably change the source org. unit in a couple of places, but we need to discuss it a bit first, so this will be other tickets)
const { orgUnit, ...passOnProps } = props; | ||
const [orgUnitKey, setOrgUnitKey] = useState(orgUnit.id); | ||
const [shouldFetch, setShouldFetch] = useState(false); | ||
const queryKey = ['organisationUnit', orgUnitKey]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change the key to reflect that we are just getting geometry here (so we don't clash with other caches). Suggestion: ['organisationUnit', 'geometry', orgUnitKey]
And use same key in useCenterPoint.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested successfully on 2.41,2.41,2.40.4,2.39.6,2.38.7 versions
## [100.67.5](v100.67.4...v100.67.5) (2024-03-21) ### Bug Fixes * [DHIS2-6335] use custom map center point ([#3312](#3312)) ([2dbaffe](2dbaffe))
🎉 This PR is included in version 100.67.5 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
DHIS2-6335
Tech summary
useApiMetadataQuery
(react query) by useCenterPoint hook in the WidgetEnrollment and withCenterPoint HOC in the rest of the forms.