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

Display errors to users during self-selected network #150

Open
FedericoDM opened this issue Feb 1, 2024 · 0 comments
Open

Display errors to users during self-selected network #150

FedericoDM opened this issue Feb 1, 2024 · 0 comments

Comments

@FedericoDM
Copy link
Contributor

What Issue Are You Seeing or What Feature Needs To Be Added?

During the self-selected game, players are able to choose either two or three players to see their guesses during the game. However, there are several scenarios that we don't want to happen. Mainly, we don't want the player selecting the same person more than once.

I tried to implement a JavaScript (which is used during session creation) for this purpose, but I did not manage to make it work. The aim of this issue is to incorporate this feature on the template.

Are There Any Links That Would Be Helpful?

Here is the JavaScript:

fetch('{{ url_for("create_session") }}', {
method: 'POST',
body: formData
})
.then(resp => {
window.location.href = resp.url
}) // or, resp.text(), etc
.catch(error => {
console.error(error);
});
function cleanParams() {
// Used to clear the URL of parameters after the banner alert is closed.
window.history.replaceState(null, '', window.location.pathname);
}
</script>

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

No branches or pull requests

1 participant