Skip to content

Commit 6f1df68

Browse files
committed
Show a message when there are no game events / proposals
1 parent 2f5b17c commit 6f1df68

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

frontend/src/components/match/GameEventList.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ import {useMatchStateStore} from "@/store/matchState";
66
const store = useMatchStateStore()
77
88
const gameEvents = computed(() => {
9-
return store.matchState.gameEvents
9+
return store.matchState.gameEvents!
1010
})
1111
</script>
1212

1313
<template>
14-
<q-list bordered class="rounded-borders">
14+
<q-list bordered class="rounded-borders" v-if="gameEvents.length > 0">
1515
<GameEventItem :game-event="gameEvent" v-for="(gameEvent, key) in gameEvents" :key="key"/>
1616
</q-list>
17+
<div v-else>
18+
No recent game events
19+
</div>
1720
</template>

frontend/src/components/match/GameEventProposalGroupItemList.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,20 @@ import {useMatchStateStore} from "@/store/matchState";
66
const store = useMatchStateStore()
77
88
const proposalGroups = computed(() => {
9-
return store.matchState.proposalGroups
10-
})
11-
12-
const hasGroups = computed(() => {
13-
return proposalGroups.value!.length > 0
9+
return store.matchState.proposalGroups!
1410
})
1511
</script>
1612

1713
<template>
18-
<q-list bordered class="rounded-borders" v-if="hasGroups">
14+
<q-list bordered class="rounded-borders" v-if="proposalGroups.length > 0">
1915
<GameEventProposalGroupItem
2016
:proposal-group="group"
2117
:group-id="groupId"
2218
v-for="(group, groupId) in proposalGroups"
2319
:key="groupId"
2420
/>
2521
</q-list>
22+
<div v-else>
23+
No recent game event proposals
24+
</div>
2625
</template>

0 commit comments

Comments
 (0)