Prevent the extra call if posts = 0

This commit is contained in:
Lim Chee Aun 2023-11-04 18:02:03 +08:00
parent fbfb5e5441
commit f8674963b3

View file

@ -304,12 +304,13 @@ function AccountInfo({
({ relationship, currentID }) => { ({ relationship, currentID }) => {
if (!relationship.following) { if (!relationship.following) {
renderFamiliarFollowers(currentID); renderFamiliarFollowers(currentID);
if (!standalone) { if (!standalone && statusesCount > 0) {
// Only render posting stats if not standalone and has posts
renderPostingStats(); renderPostingStats();
} }
} }
}, },
[standalone, id], [standalone, id, statusesCount],
); );
return ( return (