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)