-
Notifications
You must be signed in to change notification settings - Fork 6
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
Venue handling refactor #382
base: main
Are you sure you want to change the base?
Conversation
…fice venue as default prop.
…nally when the Map Template switches venue.
…o the useCurrentVenue hook where it belongs.
…entVenue hook, since it is a side effect of venue changes.
…nfusing to have a state for both the venue name and the actual venue.
…d not change the map.
…ng issues with the JavaScript SDK.
* When map position is known, run callback. | ||
*/ | ||
useEffect(() => { |
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.
Should we update the description here?
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.
I'll see to it.
/* | ||
* When venue is changed on the map, run callback. | ||
* Set the current venue name whenever the venue is changed on the map. | ||
*/ | ||
useEffect(() => { |
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.
Should update the description here as well based on the new logic
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.
🫡
@@ -74,23 +69,18 @@ const useMapBoundsDeterminer = () => { | |||
*/ | |||
useEffect(() => { | |||
determineMapBounds(); | |||
}, [mapsIndoorsInstance, venue, venues, locationId, kioskOriginLocationId, pitch, bearing, startZoomLevel, categories]); | |||
}, [mapsIndoorsInstance, currentVenueName, locationId, kioskOriginLocationId, pitch, bearing, startZoomLevel, categories]); | |||
|
|||
/** | |||
* Based on the combination of the states for venueName, locationId & kioskOriginLocationId, | |||
* determine where to make the map go to. | |||
* | |||
* @param {string} [forcedVenue] - If set, this venue will be used instead of the current venue. |
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.
I assume this param should be removed?
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.
👀 🫡
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.
✅ 🆗 🆗 🆗
…on a Location can have different casing that the Venue name (administrative ID).
What
Why
How