Template
chore : working on game
This commit is contained in:
+13
-8
@@ -11,13 +11,18 @@ async function createGame() {
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
await lobbyStore.createGame().catch((e) => {
|
||||
if (e.data.statusCode == 400) {
|
||||
console.error("Owned game limit reached");
|
||||
} else {
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
await lobbyStore
|
||||
.createGame()
|
||||
.then(() => {
|
||||
loading.value = false;
|
||||
})
|
||||
.catch((e) => {
|
||||
if (e.data.statusCode == 400) {
|
||||
console.error("Owned game limit reached");
|
||||
} else {
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -27,7 +32,7 @@ async function createGame() {
|
||||
type="button"
|
||||
value="Create Game"
|
||||
@click="createGame"
|
||||
:disabled="!userStore.self"
|
||||
:disabled="!userStore.self || loading"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user