|
|
@ -34,7 +34,6 @@ import { ServerStatus } from '../../../interfaces/server-status.model'; |
|
|
|
import { Statusbar } from '../Statusbar/Statusbar'; |
|
|
|
import { Statusbar } from '../Statusbar/Statusbar'; |
|
|
|
import { ChatMessage } from '../../../interfaces/chat-message.model'; |
|
|
|
import { ChatMessage } from '../../../interfaces/chat-message.model'; |
|
|
|
|
|
|
|
|
|
|
|
const { TabPane } = Tabs; |
|
|
|
|
|
|
|
const { Content: AntContent } = Layout; |
|
|
|
const { Content: AntContent } = Layout; |
|
|
|
|
|
|
|
|
|
|
|
// Lazy loaded components
|
|
|
|
// Lazy loaded components
|
|
|
@ -59,7 +58,16 @@ const ChatContainer = dynamic(() => |
|
|
|
import('../../chat/ChatContainer/ChatContainer').then(mod => mod.ChatContainer), |
|
|
|
import('../../chat/ChatContainer/ChatContainer').then(mod => mod.ChatContainer), |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const DesktopContent = ({ name, streamTitle, summary, tags, socialHandles, extraPageContent }) => ( |
|
|
|
const DesktopContent = ({ name, streamTitle, summary, tags, socialHandles, extraPageContent }) => { |
|
|
|
|
|
|
|
const aboutTabContent = <CustomPageContent content={extraPageContent} />; |
|
|
|
|
|
|
|
const followersTabContent = <FollowerCollection name={name} />; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const items = [ |
|
|
|
|
|
|
|
{ label: 'About', key: '2', children: aboutTabContent }, |
|
|
|
|
|
|
|
{ label: 'Followers', key: '3', children: followersTabContent }, |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
<div className={styles.lowerHalf}> |
|
|
|
<div className={styles.lowerHalf}> |
|
|
|
<ContentHeader |
|
|
|
<ContentHeader |
|
|
@ -73,17 +81,11 @@ const DesktopContent = ({ name, streamTitle, summary, tags, socialHandles, extra |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div className={styles.lowerSection}> |
|
|
|
<div className={styles.lowerSection}> |
|
|
|
<Tabs defaultActiveKey="0"> |
|
|
|
<Tabs defaultActiveKey="0" items={items} /> |
|
|
|
<TabPane tab="About" key="2"> |
|
|
|
|
|
|
|
<CustomPageContent content={extraPageContent} /> |
|
|
|
|
|
|
|
</TabPane> |
|
|
|
|
|
|
|
<TabPane tab="Followers" key="3"> |
|
|
|
|
|
|
|
<FollowerCollection name={name} /> |
|
|
|
|
|
|
|
</TabPane> |
|
|
|
|
|
|
|
</Tabs> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</> |
|
|
|
</> |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const MobileContent = ({ |
|
|
|
const MobileContent = ({ |
|
|
|
name, |
|
|
|
name, |
|
|
@ -96,11 +98,8 @@ const MobileContent = ({ |
|
|
|
chatDisplayName, |
|
|
|
chatDisplayName, |
|
|
|
chatUserId, |
|
|
|
chatUserId, |
|
|
|
showChat, |
|
|
|
showChat, |
|
|
|
}) => ( |
|
|
|
}) => { |
|
|
|
<div className={classNames(styles.lowerSectionMobile)}> |
|
|
|
const chatContent = showChat && ( |
|
|
|
<Tabs defaultActiveKey="0"> |
|
|
|
|
|
|
|
{showChat && ( |
|
|
|
|
|
|
|
<TabPane tab="Chat" key="1"> |
|
|
|
|
|
|
|
<ChatContainer |
|
|
|
<ChatContainer |
|
|
|
messages={messages} |
|
|
|
messages={messages} |
|
|
|
usernameToHighlight={chatDisplayName} |
|
|
|
usernameToHighlight={chatDisplayName} |
|
|
@ -108,9 +107,10 @@ const MobileContent = ({ |
|
|
|
isModerator={false} |
|
|
|
isModerator={false} |
|
|
|
height="40vh" |
|
|
|
height="40vh" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</TabPane> |
|
|
|
); |
|
|
|
)} |
|
|
|
|
|
|
|
<TabPane tab="About" key="2"> |
|
|
|
const aboutTabContent = ( |
|
|
|
|
|
|
|
<> |
|
|
|
<ContentHeader |
|
|
|
<ContentHeader |
|
|
|
name={name} |
|
|
|
name={name} |
|
|
|
title={streamTitle} |
|
|
|
title={streamTitle} |
|
|
@ -120,13 +120,22 @@ const MobileContent = ({ |
|
|
|
logo="/logo" |
|
|
|
logo="/logo" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<CustomPageContent content={extraPageContent} /> |
|
|
|
<CustomPageContent content={extraPageContent} /> |
|
|
|
</TabPane> |
|
|
|
</> |
|
|
|
<TabPane tab="Followers" key="3"> |
|
|
|
); |
|
|
|
<FollowerCollection name={name} /> |
|
|
|
const followersTabContent = <FollowerCollection name={name} />; |
|
|
|
</TabPane> |
|
|
|
|
|
|
|
</Tabs> |
|
|
|
const items = [ |
|
|
|
|
|
|
|
{ label: 'Chat', key: '1', children: chatContent }, |
|
|
|
|
|
|
|
{ label: 'About', key: '2', children: aboutTabContent }, |
|
|
|
|
|
|
|
{ label: 'Followers', key: '3', children: followersTabContent }, |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
|
|
|
<div className={classNames(styles.lowerSectionMobile)}> |
|
|
|
|
|
|
|
<Tabs defaultActiveKey="0" items={items} /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
export const Content: FC = () => { |
|
|
|
export const Content: FC = () => { |
|
|
|
const appState = useRecoilValue<AppStateOptions>(appStateAtom); |
|
|
|
const appState = useRecoilValue<AppStateOptions>(appStateAtom); |
|
|
|