Fix read more for long group descriptions

This commit is contained in:
Josh Perez 2021-07-19 17:14:41 -04:00 committed by GitHub
parent 7761d83055
commit b392b7c7ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,7 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import React, { useLayoutEffect, useRef, useState } from 'react';
import React, { useEffect, useRef, useState } from 'react';
import { Modal } from '../Modal';
import { LocalizerType } from '../../types/Util';
import { GroupDescriptionText } from '../GroupDescriptionText';
@ -25,7 +25,7 @@ export const GroupDescription = ({
const [hasReadMore, setHasReadMore] = useState(false);
const [showFullDescription, setShowFullDescription] = useState(false);
useLayoutEffect(() => {
useEffect(() => {
if (!textRef || !textRef.current) {
return;
}