From 3d31ebb5769b54792ca7cc59890a1de4b0ffd181 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Mon, 20 Oct 2025 12:55:16 +0200 Subject: [PATCH] Fix hooks --- web/components/bio/profile-bio.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/web/components/bio/profile-bio.tsx b/web/components/bio/profile-bio.tsx index bff8e24..cea2b94 100644 --- a/web/components/bio/profile-bio.tsx +++ b/web/components/bio/profile-bio.tsx @@ -15,13 +15,12 @@ export function ProfileBio(props: { }) { const {isCurrentUser, profile, refreshProfile, fromProfilePage} = props const [edit, setEdit] = useState(false) + const editor = useTextEditor({defaultValue: ''}) + const [textLength, setTextLength] = useState(MAX_INT) if (!isCurrentUser && !profile.bio) return null if (fromProfilePage && !profile.bio) return null - const editor = useTextEditor({defaultValue: ''}) - const [textLength, setTextLength] = useState(editor?.getText().length ?? MAX_INT) - useEffect(() => { if (!editor) return editor.commands.setContent(profile.bio as JSONContent)