lexical: pass compose text from the reducer on mount

Fixes https://gitlab.com/soapbox-pub/soapbox/-/issues/1531
This commit is contained in:
Alex Gleason
2023-09-25 22:47:55 -05:00
parent 33c775709b
commit 2d7ce9b684

View File

@ -100,7 +100,7 @@ const ComposeForm = <ID extends string>({ id, shouldCondense, autoFocus, clickab
const anyMedia = compose.media_attachments.size > 0;
const [composeFocused, setComposeFocused] = useState(false);
const [text, setText] = useState('');
const [text, setText] = useState(compose.text);
const firstRender = useRef(true);
const formRef = useRef<HTMLDivElement>(null);