Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Fix empty state for text field

Gabe Kangas6b1e2d6bf7ea
diff --git a/web/components/chat/ChatTextField/ChatTextField.tsx b/web/components/chat/ChatTextField/ChatTextField.tsx
index 8c7d9702f6..2ce05d6173 100644
--- a/web/components/chat/ChatTextField/ChatTextField.tsx
+++ b/web/components/chat/ChatTextField/ChatTextField.tsx
@@ -104,16 +104,6 @@ export default function ChatTextField(props: Props) {
const [editor] = useState(() => withImages(withReact(createEditor())));
const size = 'small';
- const EMPTY_VALUE = [
- {
- type: 'paragraph',
- children: [
- {
- text: '',
- },
- ],
- },
- ];
const sendMessage = () => {
if (!websocketService) {
@@ -154,11 +144,7 @@ export default function ChatTextField(props: Props) {
return (
<div className={s.root}>
- <Slate
- editor={editor}
- value={[{ type: 'span', children: [{ text: 'hey' }] }]}
- onChange={handleChange}
- >
+ <Slate editor={editor} value={[]} onChange={handleChange}>
<Editable
onKeyDown={onKeyDown}
renderElement={p => <Element {...p} />}
diff --git a/web/components/ui/Sidebar/Sidebar.tsx b/web/components/ui/Sidebar/Sidebar.tsx
index 39f921ac2b..1baabc17fc 100644
--- a/web/components/ui/Sidebar/Sidebar.tsx
+++ b/web/components/ui/Sidebar/Sidebar.tsx
@@ -26,8 +26,8 @@ export default function Sidebar() {
<div className={s.chatHeader}>
<span>stream chat</span>
</div>
- <ChatContainer messages={messages} state={chatState} />
- <ChatTextField />
+ <ChatContainer messages={messages} state={chatState} />
+ <ChatTextField />
</Sider>
);
}