mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
Fix empty state for text field
This commit is contained in:
parent
f6525412c8
commit
0d5d89a1c8
@ -104,16 +104,6 @@ export default function ChatTextField(props: Props) {
|
|||||||
const [editor] = useState(() => withImages(withReact(createEditor())));
|
const [editor] = useState(() => withImages(withReact(createEditor())));
|
||||||
|
|
||||||
const size = 'small';
|
const size = 'small';
|
||||||
const EMPTY_VALUE = [
|
|
||||||
{
|
|
||||||
type: 'paragraph',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
text: '',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const sendMessage = () => {
|
const sendMessage = () => {
|
||||||
if (!websocketService) {
|
if (!websocketService) {
|
||||||
@ -154,11 +144,7 @@ export default function ChatTextField(props: Props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={s.root}>
|
<div className={s.root}>
|
||||||
<Slate
|
<Slate editor={editor} value={[]} onChange={handleChange}>
|
||||||
editor={editor}
|
|
||||||
value={[{ type: 'span', children: [{ text: 'hey' }] }]}
|
|
||||||
onChange={handleChange}
|
|
||||||
>
|
|
||||||
<Editable
|
<Editable
|
||||||
onKeyDown={onKeyDown}
|
onKeyDown={onKeyDown}
|
||||||
renderElement={p => <Element {...p} />}
|
renderElement={p => <Element {...p} />}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user