diff --git a/web-svelte/src/components/modals/JoinLobby.svelte b/web-svelte/src/components/modals/JoinLobby.svelte index 8b0250c..dc24ecd 100644 --- a/web-svelte/src/components/modals/JoinLobby.svelte +++ b/web-svelte/src/components/modals/JoinLobby.svelte @@ -16,6 +16,13 @@ let errorMessage: string|null = null; function handleLobbyConnection(data: ILobbyInfo) { if (data.status == Status.Success) { console.debug(`Succesfully joined lobby`); + + let url = new URL(window.location.href); + let qs = url.searchParams; + qs.set(`game`, data.game_code); + + window.history.replaceState(null, null, url) + gameCode.set(data.game_code); players.set(data.players); emit(`joined`);