Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
feat(post): hide post load button when fetching new ones
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed Nov 14, 2022
1 parent fd1f530 commit 9eb9657
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions components/post/multiviewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@
<SelectableExistence v-model="existence" class="existence"/>
</form>

<Viewer
v-for="(post, i) in posts.data"
:key="post.id"
v-model="posts.data[i]"
:comment-count="posts.data[i].meta?.commentCount || 0"
class="viewer"
@archive="archivePost"
@restore="restorePost"/>
<Suspensible class="viewer-group" :is-loaded="isLoaded">
<Viewer
v-for="(post, i) in posts.data"
:key="post.id"
v-model="posts.data[i]"
:comment-count="posts.data[i].meta?.commentCount || 0"
class="viewer"
@archive="archivePost"
@restore="restorePost"/>
<p v-if="hasNoPosts">
There are no posts found.
</p>
</Suspensible>
<div v-if="hasRemainingPosts" class="load-others">
<button
class="btn btn-primary"
@click="retrievePosts">
Load other posts
</button>
</div>
<div v-if="hasRemainingPosts" class="load-others">
<button
class="btn btn-primary"
@click="retrievePosts">
Load other posts
</button>
</div>
</Suspensible>
</div>
</template>
Expand Down

0 comments on commit 9eb9657

Please sign in to comment.