From 8c32e3c08e137e98c61e2be6068261f2d92bca2e Mon Sep 17 00:00:00 2001 From: DIYgod Date: Wed, 14 Jun 2023 15:50:31 +0100 Subject: [PATCH] fix: load more button loading indicator --- src/components/site/PostList.tsx | 18 ++++++++++-------- src/css/tailwind.css | 2 ++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/components/site/PostList.tsx b/src/components/site/PostList.tsx index 91a0ed4b..5fd4e03d 100644 --- a/src/components/site/PostList.tsx +++ b/src/components/site/PostList.tsx @@ -61,14 +61,16 @@ export default function PostList({ isLoading={posts.isFetchingNextPage} aria-label="load more" > - {t("load more", { - ns: "site", - name: t( - "post" + - (posts.data?.pages[0].count - currentLength > 1 ? "s" : ""), - ), - count: posts.data?.pages[0].count - currentLength, - })} + + {t("load more", { + ns: "site", + name: t( + "post" + + (posts.data?.pages[0].count - currentLength > 1 ? "s" : ""), + ), + count: posts.data?.pages[0].count - currentLength, + })} + )} diff --git a/src/css/tailwind.css b/src/css/tailwind.css index a9e4e212..416d247f 100644 --- a/src/css/tailwind.css +++ b/src/css/tailwind.css @@ -125,6 +125,8 @@ a { border-bottom-color: currentColor; border-right-color: currentColor; @apply animate-spin; + @apply inline-block; + @apply align-middle; } .button.is-block {