import React, { ComponentType, FC } from 'react'; import dynamic from 'next/dynamic'; import { TabsProps } from 'antd'; import { SocialLink } from '../../../interfaces/social-link.model'; import styles from './Content.module.scss'; import { CustomPageContent } from '../CustomPageContent/CustomPageContent'; import { ContentHeader } from '../../common/ContentHeader/ContentHeader'; export type DesktopContentProps = { name: string; streamTitle: string; summary: string; tags: string[]; socialHandles: SocialLink[]; extraPageContent: string; setShowFollowModal: (show: boolean) => void; supportFediverseFeatures: boolean; }; // lazy loaded components const Tabs: ComponentType = dynamic(() => import('antd').then(mod => mod.Tabs), { ssr: false, }); const FollowerCollection = dynamic( () => import('../followers/FollowerCollection/FollowerCollection').then( mod => mod.FollowerCollection, ), { ssr: false, }, ); export const DesktopContent: FC = ({ name, streamTitle, summary, tags, socialHandles, extraPageContent, setShowFollowModal, supportFediverseFeatures, }) => { const aboutTabContent = (
); const followersTabContent = (
setShowFollowModal(true)} />
); const items = [{ label: 'About', key: '2', children: aboutTabContent }]; if (supportFediverseFeatures) { items.push({ label: 'Followers', key: '3', children: followersTabContent }); } return ( <>
{items.length > 1 ? : aboutTabContent}
); };