From 4e6051eb476bc215da4b4afbce4dd90d3dce84b7 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Fri, 23 Oct 2020 23:39:22 -0600 Subject: [PATCH] Add code to conditionally change the join sequence --- src/views/GameCode.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/views/GameCode.vue b/src/views/GameCode.vue index 2a60249..c72c772 100644 --- a/src/views/GameCode.vue +++ b/src/views/GameCode.vue @@ -66,10 +66,17 @@ export default { }); return; }; - localStorage.setItem(`user-id`, data.uuid); sessionStorage.setItem(`user-name`, this.username); sessionStorage.setItem(`game-code`, this.game_code); sessionStorage.setItem(`is-host`, false); + + // rejoining the game + if (data.rejoin) { + this.$emit(`go-to`, `in-game`); + return; + }; + + localStorage.setItem(`user-id`, data.uuid); this.$emit(`alert`, { message: ``, classes: [] }) this.$emit(`go-to`, `lobby`); }