From a2615e1d18eaa51bbc6ed2d758b131bbcca13020 Mon Sep 17 00:00:00 2001 From: Sana Yasmin Date: Thu, 5 Dec 2024 12:20:08 +0530 Subject: [PATCH] fix:#667 - Fixed load more button visible --- src/pages/SearchPage.vue | 8 +++++++- src/stores/prompts.js | 5 ++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/pages/SearchPage.vue b/src/pages/SearchPage.vue index c284d023..b0a44a99 100644 --- a/src/pages/SearchPage.vue +++ b/src/pages/SearchPage.vue @@ -46,7 +46,13 @@
- +
diff --git a/src/stores/prompts.js b/src/stores/prompts.js index 73609791..ac52b262 100644 --- a/src/stores/prompts.js +++ b/src/stores/prompts.js @@ -113,10 +113,9 @@ export const usePromptStore = defineStore('prompts', { if (newPrompts.length > 0) { this._lastVisible = querySnapshot.docs[querySnapshot.docs.length - 1] - this._hasMore = true - } else { - this._hasMore = false } + if (newPrompts.length > 4) this._hasMore = true + else this._hasMore = false this._prompts = loadMore ? [...(this._prompts || []), ...newPrompts] : newPrompts