From 2d7ce9b684b68ef5e9eb1a3f3a2be6f601c6551e Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 25 Sep 2023 22:47:55 -0500 Subject: [PATCH] lexical: pass compose text from the reducer on mount Fixes https://gitlab.com/soapbox-pub/soapbox/-/issues/1531 --- src/features/compose/components/compose-form.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/compose/components/compose-form.tsx b/src/features/compose/components/compose-form.tsx index 6e0bda14f2..ead48ae107 100644 --- a/src/features/compose/components/compose-form.tsx +++ b/src/features/compose/components/compose-form.tsx @@ -100,7 +100,7 @@ const ComposeForm = ({ 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(null);