From c949af2f66a762aa561bfeecd0004c6098745fcf Mon Sep 17 00:00:00 2001 From: robin Date: Wed, 13 Sep 2023 14:46:42 -0400 Subject: [PATCH] Change follow list item order (#1911) --- .../components/Feed/Posts/PostBottomSheet.tsx | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/apps/mobile/src/components/Feed/Posts/PostBottomSheet.tsx b/apps/mobile/src/components/Feed/Posts/PostBottomSheet.tsx index fd29cd8632..8b925cefac 100644 --- a/apps/mobile/src/components/Feed/Posts/PostBottomSheet.tsx +++ b/apps/mobile/src/components/Feed/Posts/PostBottomSheet.tsx @@ -129,14 +129,6 @@ function PostBottomSheet( } }, [followUser, unfollowUser, isFollowing, userToFollow.dbid]); - const followUserText = useMemo(() => { - if (isFollowing) { - return `Unfollow ${username}`; - } else { - return `Follow ${username}`; - } - }, [isFollowing, username]); - const media = getVideoOrImageUrlForNftPreview({ tokenRef: token, preferStillFrameFromGif: true, @@ -156,7 +148,7 @@ function PostBottomSheet( }, [token]); const inner = useMemo(() => { - if (isOwnPost) + if (isOwnPost) { return ( <> @@ -164,21 +156,33 @@ function PostBottomSheet( ); + } + + if (isFollowing) { + return ( + <> + + + + + ); + } return ( <> - + ); }, [ - followUserText, handleDeletePost, handleFollowUser, handleShare, handleViewNftDetail, + isFollowing, isOwnPost, + username, ]); return (