lexical: pass compose text from the reducer on mount
Fixes https://gitlab.com/soapbox-pub/soapbox/-/issues/1531
This commit is contained in:
parent
33c775709b
commit
2d7ce9b684
|
@ -100,7 +100,7 @@ const ComposeForm = <ID extends string>({ id, shouldCondense, autoFocus, clickab
|
||||||
const anyMedia = compose.media_attachments.size > 0;
|
const anyMedia = compose.media_attachments.size > 0;
|
||||||
|
|
||||||
const [composeFocused, setComposeFocused] = useState(false);
|
const [composeFocused, setComposeFocused] = useState(false);
|
||||||
const [text, setText] = useState('');
|
const [text, setText] = useState(compose.text);
|
||||||
|
|
||||||
const firstRender = useRef(true);
|
const firstRender = useRef(true);
|
||||||
const formRef = useRef<HTMLDivElement>(null);
|
const formRef = useRef<HTMLDivElement>(null);
|
||||||
|
|
Loading…
Reference in New Issue