Show "Follow" button next to accounts in a collection when logged out (#38933)
This commit is contained in:
1 parent
f24f98ce40
commit
60a437e045
3 files changed
+21
-8
No files matched your search
@@ -138,12 +138,16 @@ export const CollectionAccountsList: React.FC<{
|
||||
|
||||
const renderAccountItemButton = useCallback(
|
||||
({ relationship, accountId }: RenderButtonOptions) => {
|
||||
if (!me || !relationship) {
|
||||
// Show follow button when logged out (it will trigger the remote interaction modal)
|
||||
return <AccountListItemFollowButton accountId={accountId} />;
|
||||
}
|
||||
|
||||
// When viewing your own collection, only show the Follow button
|
||||
// for accounts you're not following anymore.
|
||||
const withoutButton =
|
||||
!relationship ||
|
||||
(collectionOwnerId === me &&
|
||||
(relationship.following || relationship.requested));
|
||||
collectionOwnerId === me &&
|
||||
(relationship.following || relationship.requested);
|
||||
|
||||
if (withoutButton) return null;
|
||||
|
||||
|
||||
Reference in new issue
Block a user