Handle hideCollections

pull/543/head
Lim Chee Aun 2024-05-16 21:11:51 +08:00
rodzic 9934daeb4d
commit b0a53b7fa1
2 zmienionych plików z 9 dodań i 1 usunięć

Wyświetl plik

@ -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);
}}

Wyświetl plik

@ -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>