From 8a2c6015f812e171a168ad076a9f5d9ca3a4708d Mon Sep 17 00:00:00 2001 From: DIYgod Date: Thu, 11 May 2023 01:18:01 +0100 Subject: [PATCH] feat: UI optimizations --- src/components/common/ConnectButton.tsx | 2 +- src/components/common/FollowingButton.tsx | 18 ++++++++++-------- src/components/site/Platform.tsx | 7 ++++++- src/components/site/PostCover.tsx | 4 ++-- src/components/site/SiteFooter.tsx | 1 + src/components/site/SiteHome.tsx | 1 + src/components/ui/FAB.tsx | 1 + 7 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/components/common/ConnectButton.tsx b/src/components/common/ConnectButton.tsx index b39a6263..a12a4e00 100644 --- a/src/components/common/ConnectButton.tsx +++ b/src/components/common/ConnectButton.tsx @@ -229,7 +229,7 @@ export const ConnectButton: React.FC<{ {isAllRead ? ( diff --git a/src/components/common/FollowingButton.tsx b/src/components/common/FollowingButton.tsx index 27c0ec6e..4b541cc8 100644 --- a/src/components/common/FollowingButton.tsx +++ b/src/components/common/FollowingButton.tsx @@ -81,6 +81,12 @@ export const FollowingButton: React.FC<{ loadingStatusChange, ]) + const isLoading = subscription.data + ? unsubscribeFromSite.isLoading || subscribeToSite.isLoading + : unsubscribeFromSite.isLoading || + subscribeToSite.isLoading || + subscription.isLoading + return (