Remove the is-host event for the data and put it into sessionStorage
This commit is contained in:
parent
e9416b5dce
commit
74a784f497
2 changed files with 2 additions and 5 deletions
|
|
@ -14,7 +14,6 @@
|
|||
/>
|
||||
<Join-Or-Host
|
||||
v-else-if="state == 'game-type'"
|
||||
@is-host="is_host = $event"
|
||||
@go-to="state = $event"
|
||||
/>
|
||||
<Game-Code
|
||||
|
|
@ -65,7 +64,6 @@ export default {
|
|||
*/
|
||||
state: `game-type`,
|
||||
game_code: ``,
|
||||
is_host: false,
|
||||
alert: {
|
||||
message: ``,
|
||||
classes: []
|
||||
|
|
|
|||
|
|
@ -41,9 +41,8 @@ export default {
|
|||
HostInformation(data) {
|
||||
if (data.success) {
|
||||
sessionStorage.setItem(`game-code`, data.game_code);
|
||||
this.$emit(`is-host`, true);
|
||||
// this.$emit(`go-to`, `lobby`);
|
||||
this.$store.state.state = `lobby`;
|
||||
sessionStorage.setItem(`host`, true);
|
||||
this.$emit(`go-to`, `lobby`);
|
||||
} else {
|
||||
this.error = data.error_message
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue