Skip to content

Commit

Permalink
Fix members list to support odd number of members
Browse files Browse the repository at this point in the history
  • Loading branch information
loriswit committed Sep 21, 2021
1 parent eaedf91 commit 63eb80f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/src/views/Members.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
<div id="members" v-if="group">
<h1>{{ $t("members.title") }}</h1>
<v-container>
<v-row v-for="(_, i) in members.length / 2" :key="'row-' + i" justify="center">
<v-row v-for="(_, i) in Math.ceil(members.length / 2)" :key="'row-' + i" justify="center">
<v-col v-for="j in 2" :key="'col-' + j" cols="5">
<router-link :to="'members/' + members[i * 2 + j - 1]" class="member">
<router-link v-if="members.length >= i * 2 + j"
:to="'members/' + members[i * 2 + j - 1]" class="member">
<v-icon>mdi-account</v-icon>
<span>{{ members[i * 2 + j - 1] }}</span>
</router-link>
Expand Down

1 comment on commit 63eb80f

@vercel
Copy link

@vercel vercel bot commented on 63eb80f Sep 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.