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

Separate session data per config #23

Merged
merged 1 commit into from
Apr 22, 2024
Merged

Separate session data per config #23

merged 1 commit into from
Apr 22, 2024

Conversation

dgmstuart
Copy link
Owner

Pass the file name to the session data key, so that we get separate
entries per config.

This has the effect of auto-switching the grid when choosing a new
config - that's not actually an expected use case but it feels correct
that the app should only be able to show a consistent set of config and
words.

Jump through some hoops to avoid not found resulting in junk
localstorage entries:

Since we fall back to a default list if the name is not recognised
(maybe a bad idea?), the param doesn't always match the list filename,
and we don't want eg http://localhost:5173/bingo-frontend/foo to result
in storing bingoSession-foo in localstorage.

Maybe we can skip all that nonsense and do some kind of redirect or not
found instead?

Pass the file name to the session data key, so that we get separate
entries per config.

This has the effect of auto-switching the grid when choosing a new
config - that's not actually an expected use case but it feels correct
that the app should only be able to show a consistent set of config and
words.

Jump through some hoops to avoid not found resulting in junk
localstorage entries:

Since we fall back to a default list if the name is not recognised
(maybe a bad idea?), the param doesn't always match the list filename,
and we don't want eg http://localhost:5173/bingo-frontend/foo to result
in storing bingoSession-foo in localstorage.

Maybe we can skip all that nonsense and do some kind of redirect or not
found instead?
@dgmstuart dgmstuart merged commit e6ee863 into main Apr 22, 2024
3 checks passed
@dgmstuart dgmstuart deleted the keyed-session-data branch April 22, 2024 20:42
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.

1 participant