Handle hideCollections
This commit is contained in:
parent
9934daeb4d
commit
b0a53b7fa1
|
@ -186,6 +186,7 @@ function AccountInfo({
|
|||
memorial,
|
||||
moved,
|
||||
roles,
|
||||
hideCollections,
|
||||
} = info || {};
|
||||
let headerIsAvatar = false;
|
||||
let { header, headerStatic } = info || {};
|
||||
|
@ -677,6 +678,9 @@ function AccountInfo({
|
|||
excludeRelationshipAttrs: isSelf
|
||||
? ['followedBy']
|
||||
: [],
|
||||
blankCopy: hideCollections
|
||||
? 'This user has chosen to not make this information available.'
|
||||
: undefined,
|
||||
};
|
||||
}, 0);
|
||||
}}
|
||||
|
@ -712,6 +716,9 @@ function AccountInfo({
|
|||
fetchAccounts: fetchFollowing,
|
||||
instance,
|
||||
excludeRelationshipAttrs: isSelf ? ['following'] : [],
|
||||
blankCopy: hideCollections
|
||||
? 'This user has chosen to not make this information available.'
|
||||
: undefined,
|
||||
};
|
||||
}, 0);
|
||||
}}
|
||||
|
|
|
@ -20,6 +20,7 @@ export default function GenericAccounts({
|
|||
excludeRelationshipAttrs = [],
|
||||
postID,
|
||||
onClose = () => {},
|
||||
blankCopy = 'Nothing to show',
|
||||
}) {
|
||||
const { masto, instance: currentInstance } = api();
|
||||
const isCurrentInstance = instance ? instance === currentInstance : true;
|
||||
|
@ -221,7 +222,7 @@ export default function GenericAccounts({
|
|||
) : uiState === 'error' ? (
|
||||
<p class="ui-state">Error loading accounts</p>
|
||||
) : (
|
||||
<p class="ui-state insignificant">Nothing to show</p>
|
||||
<p class="ui-state insignificant">{blankCopy}</p>
|
||||
)}
|
||||
</main>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue