diff --git a/web/components/follow-list.tsx b/web/components/follow-list.tsx index 0eef1170..c935f73d 100644 --- a/web/components/follow-list.tsx +++ b/web/components/follow-list.tsx @@ -36,6 +36,7 @@ export function FollowList(props: { userIds: string[] }) { } onFollow={() => onFollow(userId)} onUnfollow={() => onUnfollow(userId)} + hideFollowButton={userId === currentUser?.id} /> ))} @@ -47,9 +48,17 @@ function UserFollowItem(props: { isFollowing: boolean onFollow: () => void onUnfollow: () => void + hideFollowButton?: boolean className?: string }) { - const { userId, isFollowing, onFollow, onUnfollow, className } = props + const { + userId, + isFollowing, + onFollow, + onUnfollow, + hideFollowButton, + className, + } = props const user = useUserById(userId) return ( @@ -58,11 +67,13 @@ function UserFollowItem(props: { {user && } - + {!hideFollowButton && ( + + )} ) }