mirror of
https://github.com/owncast/owncast.git
synced 2024-10-24 05:25:58 +03:00
Do not show custom page content sections if it is empty. Closes #2752
This commit is contained in:
parent
f2c8278780
commit
38a52c501c
2 changed files with 11 additions and 6 deletions
|
@ -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" />
|
||||||
<div className={styles.bottomPageContentContainer}>
|
{!!extraPageContent && (
|
||||||
<CustomPageContent content={extraPageContent} />
|
<div className={styles.bottomPageContentContainer}>
|
||||||
</div>
|
<CustomPageContent content={extraPageContent} />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
const followersTabContent = (
|
const followersTabContent = (
|
||||||
|
|
Loading…
Reference in a new issue