mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-04-04 23:03:45 -04:00
Fix effect
This commit is contained in:
@@ -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 (
|
||||
<Col>
|
||||
{textLength < MIN_BIO_LENGTH && !edit && (
|
||||
|
||||
Reference in New Issue
Block a user