Fix empty state for text field

This commit is contained in:
Gabe Kangas 2022-05-17 17:58:51 -07:00
parent f6525412c8
commit 0d5d89a1c8
No known key found for this signature in database
GPG key ID: 9A56337728BC81EA
2 changed files with 3 additions and 17 deletions

View file

@ -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} />}