From 0f936ec0e7606cb79434d94096b6e113a7ce78eb Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 15 Dec 2023 18:35:16 +0100
Subject: refactor(stories): migrate stories to CSF3 format

---
 src/components/organisms/posts-list/posts-list.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/components/organisms/posts-list/posts-list.tsx')

diff --git a/src/components/organisms/posts-list/posts-list.tsx b/src/components/organisms/posts-list/posts-list.tsx
index c4c6fa1..ad5bed5 100644
--- a/src/components/organisms/posts-list/posts-list.tsx
+++ b/src/components/organisms/posts-list/posts-list.tsx
@@ -230,7 +230,7 @@ const PostsListWithRef: ForwardRefRenderFunction<
           max={total}
         />
       ) : null}
-      {onLoadMore ? (
+      {onLoadMore && (!total || (total && posts.length < total)) ? (
         <Button
           className={styles.btn}
           isLoading={isLoading}
-- 
cgit v1.2.3

