-
Notifications
You must be signed in to change notification settings - Fork 53
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
nearby view: react to user location #1159
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.
I think this is causing a bug where when you navigate to Nearby View from elsewhere, the useEffect triggers and immediately redirects to the current location if it's present. I think a better way to handle this would be to use the new function that I added that calculates which location to use for the nearby view. Then we can use the user's current location if we don't have one from the URL.
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.
Works much better, thank you! The only other thing that would be a nice to have is zooming the map to the user's location when you navigate to the nearby view without a set location. (as is, the map doesn't move, so the nearby view center could be off screen)
I think this behavior is covered by another PR! |
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.
Looks good!
Description:
The nearby view was ignoring the user location. This is not a good thing! This PR makes use of the user current position, regardless of how we get that position.
PR Checklist: