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