Add players array and related mutations
This commit is contained in:
parent
dd365dde86
commit
f31341ffd8
2 changed files with 33 additions and 9 deletions
|
|
@ -64,7 +64,10 @@ export default {
|
|||
return;
|
||||
};
|
||||
|
||||
history.replaceState(null, ``, `?game=${data.game_code}`);
|
||||
|
||||
// Save the data in the store
|
||||
this.$store.commit(`playerList`, data.players);
|
||||
this.$store.commit(`game_code`, this.game_code);
|
||||
this.$store.commit(`player`, {
|
||||
name: this.name,
|
||||
|
|
@ -79,7 +82,10 @@ export default {
|
|||
return;
|
||||
};
|
||||
|
||||
history.replaceState(null, ``, `?game=${data.game_code}`);
|
||||
|
||||
// Update storage
|
||||
this.$store.commit(`playerList`, data.players);
|
||||
this.$store.commit(`game_code`, data.game_code);
|
||||
this.$store.commit(`player`, {
|
||||
name: this.name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue