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
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 1 deletions

View File

@ -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);