import { useRecoilValue } from 'recoil'; import { Layout, Button, Tabs } from 'antd'; import { NotificationFilled, HeartFilled } from '@ant-design/icons'; import { chatVisibilityAtom, clientConfigStateAtom, chatMessagesAtom, chatStateAtom, serverStatusState, } from '../../stores/ClientConfigStore'; import { ClientConfig } from '../../../interfaces/client-config.model'; import CustomPageContent from '../../CustomPageContent'; import OwncastPlayer from '../../video/OwncastPlayer'; import FollowerCollection from '../../FollowersCollection'; import s from './Content.module.scss'; import Sidebar from '../Sidebar'; import Footer from '../Footer'; import ChatContainer from '../../chat/ChatContainer'; import { ChatMessage } from '../../../interfaces/chat-message.model'; import { ChatState, ChatVisibilityState } from '../../../interfaces/application-state'; import ChatTextField from '../../chat/ChatTextField/ChatTextField'; import ActionButtonRow from '../../action-buttons/ActionButtonRow'; import ActionButton from '../../action-buttons/ActionButton'; import Statusbar from '../Statusbar/Statusbar'; import { ServerStatus } from '../../../interfaces/server-status.model'; import { Follower } from '../../../interfaces/follower'; import SocialLinks from '../SocialLinks/SocialLinks'; import NotifyReminderPopup from '../NotifyReminderPopup/NotifyReminderPopup'; import ServerLogo from '../Logo/Logo'; import CategoryIcon from '../CategoryIcon/CategoryIcon'; const { TabPane } = Tabs; const { Content } = Layout; export default function ContentComponent() { const status = useRecoilValue(serverStatusState); const clientConfig = useRecoilValue(clientConfigStateAtom); const chatVisibility = useRecoilValue(chatVisibilityAtom); const messages = useRecoilValue(chatMessagesAtom); const chatState = useRecoilValue(chatStateAtom); const { extraPageContent, version, socialHandles, name, title, tags } = clientConfig; const { online, viewerCount, lastConnectTime, lastDisconnectTime } = status; const followers: Follower[] = []; const total = 0; const chatVisible = chatState === ChatState.Available && chatVisibility === ChatVisibilityState.Visible; // This is example content. It should be removed. const externalActions = [ { url: 'https://owncast.online/docs', title: 'Example button', description: 'Example button description', icon: 'https://owncast.online/images/logo.svg', color: '#5232c8', openExternally: false, }, ]; const externalActionButtons = externalActions.map(action => ( )); return (
{externalActionButtons} {}} notificationClosed={() => {}} >
{name}
{title}
{tags.length > 0 && tags.map(tag => #{tag} )}
{chatVisibility && (
)}
{chatVisible && }
); }