helium / mappers

Mappers Frontend and API
Apache License 2.0
65 stars 23 forks source link

Remember closed state of modal. #70

Closed jthiller closed 3 years ago

jthiller commented 3 years ago

Uses localstorage to remember modal state.

I also tried to leverage localstorage to remember the coordinates of the user's last location (lat,lng), but I feel this behavior is probably better executed with session storage. I was also experiencing some funny behavior when opening the app in two tabs simultaneously.

There might be some argument to home-roll the storage extensions instead of use a 3rd party library, but for now this keeps the options open for leveraging localstorage for other attributes with an easy hook. Might be handy in the future.

Screenflick Movie 3-2

closes #45

jthiller commented 3 years ago

Oh, additional note: I named the key ..._v1 to make it easy to 'cache-bust' the modal state should we need users to see some new information for the welcome modal.