owncast/web/components/ui/Sidebar/Sidebar.tsx

21 lines
764 B
TypeScript
Raw Normal View History

import Sider from 'antd/lib/layout/Sider';
import { useRecoilValue } from 'recoil';
import { ChatMessage } from '../../../interfaces/chat-message.model';
2022-05-22 16:05:40 +03:00
import { ChatContainer, ChatTextField } from '../../chat';
import s from './Sidebar.module.scss';
import { chatMessagesAtom, appStateAtom } from '../../stores/ClientConfigStore';
import { AppStateOptions } from '../../stores/application-state';
export default function Sidebar() {
const messages = useRecoilValue<ChatMessage[]>(chatMessagesAtom);
const appState = useRecoilValue<AppStateOptions>(appStateAtom);
return (
<Sider className={s.root} collapsedWidth={0} width={320}>
<ChatContainer messages={messages} loading={appState.chatLoading} />
2022-05-18 03:58:51 +03:00
<ChatTextField />
</Sider>
);
}