Skip to content
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

316 - SFG reload map on refresh #319

Merged

Conversation

ms0ur1s
Copy link
Collaborator

@ms0ur1s ms0ur1s commented Apr 26, 2024

What? Why?

Closes #316

If a browser refresh is performed when a map is open, LX is reloaded with the default untitled map.

As suggested by @rogup, on opening a map the mapId is added to the browser's sessionStorage, and when browser tab is reloaded a check is run and if a mapId is present the requisite map is reloaded.

What should we test?

  • Log in to LX
  • open a map
  • use map
  • refresh the browser tab

@ms0ur1s ms0ur1s linked an issue Apr 26, 2024 that may be closed by this pull request
@ms0ur1s ms0ur1s requested a review from rogup April 26, 2024 10:09
src/actions/MapActions.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@rogup rogup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ms0ur1s it's looking good! I've added a few comments, lmk if I need to clarify anything

@ms0ur1s
Copy link
Collaborator Author

ms0ur1s commented Apr 30, 2024

@rogup, thanks the refactoring advice, all changes made.

@rogup
Copy link
Collaborator

rogup commented May 1, 2024

@ms0ur1s cool, looks good to merge :)

@ms0ur1s
Copy link
Collaborator Author

ms0ur1s commented May 2, 2024

@ms0ur1s cool, looks good to merge :)

Nice one, thanks man.

@ms0ur1s ms0ur1s merged commit 76ff265 into development May 2, 2024
2 checks passed
@ms0ur1s ms0ur1s deleted the 316-social-farms--gardens-spring-24-reload-map-on-refresh branch May 2, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Social Farms & Gardens-Spring-24] Reload map on refresh
2 participants