From edf30897f2a9d951615ebc899400d680009717d0 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Mon, 20 Oct 2025 12:56:42 +0200 Subject: [PATCH] Fix effect --- web/components/bio/profile-bio.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/components/bio/profile-bio.tsx b/web/components/bio/profile-bio.tsx index cea2b94a..99c759c2 100644 --- a/web/components/bio/profile-bio.tsx +++ b/web/components/bio/profile-bio.tsx @@ -18,15 +18,15 @@ export function ProfileBio(props: { const editor = useTextEditor({defaultValue: ''}) const [textLength, setTextLength] = useState(MAX_INT) - if (!isCurrentUser && !profile.bio) return null - if (fromProfilePage && !profile.bio) return null - useEffect(() => { if (!editor) return editor.commands.setContent(profile.bio as JSONContent) setTextLength(editor.getText().length) }, [profile.bio, editor]) + if (!isCurrentUser && !profile.bio) return null + if (fromProfilePage && !profile.bio) return null + return ( {textLength < MIN_BIO_LENGTH && !edit && (