Do not show custom page content sections if it is empty. Closes #2752
This commit is contained in:
@@ -52,8 +52,7 @@ export const DesktopContent: FC<DesktopContentProps> = ({
|
|||||||
<FollowerCollection name={name} onFollowButtonClick={() => setShowFollowModal(true)} />
|
<FollowerCollection name={name} onFollowButtonClick={() => setShowFollowModal(true)} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
const items = [!!extraPageContent && { label: 'About', key: '2', children: aboutTabContent }];
|
||||||
const items = [{ label: 'About', key: '2', children: aboutTabContent }];
|
|
||||||
if (supportFediverseFeatures) {
|
if (supportFediverseFeatures) {
|
||||||
items.push({ label: 'Followers', key: '3', children: followersTabContent });
|
items.push({ label: 'Followers', key: '3', children: followersTabContent });
|
||||||
}
|
}
|
||||||
@@ -71,7 +70,11 @@ export const DesktopContent: FC<DesktopContentProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.lowerSection}>
|
<div className={styles.lowerSection}>
|
||||||
{items.length > 1 ? <Tabs defaultActiveKey="0" items={items} /> : aboutTabContent}
|
{items.length > 1 ? (
|
||||||
|
<Tabs defaultActiveKey="0" items={items} />
|
||||||
|
) : (
|
||||||
|
!!extraPageContent && aboutTabContent
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -86,9 +86,11 @@ export const MobileContent: FC<MobileContentProps> = ({
|
|||||||
const aboutTabContent = (
|
const aboutTabContent = (
|
||||||
<>
|
<>
|
||||||
<ContentHeader name={name} summary={summary} tags={tags} links={socialHandles} logo="/logo" />
|
<ContentHeader name={name} summary={summary} tags={tags} links={socialHandles} logo="/logo" />
|
||||||
|
{!!extraPageContent && (
|
||||||
<div className={styles.bottomPageContentContainer}>
|
<div className={styles.bottomPageContentContainer}>
|
||||||
<CustomPageContent content={extraPageContent} />
|
<CustomPageContent content={extraPageContent} />
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
const followersTabContent = (
|
const followersTabContent = (
|
||||||
|
|||||||
Reference in New Issue
Block a user