Skip to content

Commit 3d4b5d8

Browse files
Anthony KinseyAnthony Kinsey
authored andcommitted
feat: add message for when a board has no threads
1 parent 3e73d15 commit 3d4b5d8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/views/Threads.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,17 @@
5656
</table>
5757

5858
<!-- Thread Sorting Controls -->
59-
<div class="thread-sort">Sort <a href="" @click.prevent="setSortField()">{{ threadData.data.desc === true ? 'descending' : 'ascending' }}</a> by
59+
<div class="centered-text" v-if="!threadData?.data?.thread_count">
60+
<h4>There are currently no threads in this board, start a new thread to get the conversation going!</h4>
61+
</div>
62+
<div class="thread-sort" v-if="threadData && threadData.data && threadData.data.thread_count">Sort <a href="" @click.prevent="setSortField()">{{ threadData.data.desc === true ? 'descending' : 'ascending' }}</a> by
6063
<select v-model="sortField" name="select-thread-sort" class="select-clean" @change="setSortField()">
6164
<option v-for="item in sortItems" :key="item.value" :value="item.value">{{item.label}}</option>
6265
</select>
6366
</div>
6467

6568
<!-- Thread Listing -->
66-
<table class="threads-list" v-if="threadData && threadData.data">
69+
<table class="threads-list" v-if="threadData && threadData.data && threadData.data.thread_count">
6770
<caption>Threads</caption>
6871
<thead>
6972
<tr>

0 commit comments

Comments
 (0)