Fix read more for long group descriptions
This commit is contained in:
parent
7761d83055
commit
b392b7c7ee
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
// Copyright 2021 Signal Messenger, LLC
|
// Copyright 2021 Signal Messenger, LLC
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// 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 { Modal } from '../Modal';
|
||||||
import { LocalizerType } from '../../types/Util';
|
import { LocalizerType } from '../../types/Util';
|
||||||
import { GroupDescriptionText } from '../GroupDescriptionText';
|
import { GroupDescriptionText } from '../GroupDescriptionText';
|
||||||
|
@ -25,7 +25,7 @@ export const GroupDescription = ({
|
||||||
const [hasReadMore, setHasReadMore] = useState(false);
|
const [hasReadMore, setHasReadMore] = useState(false);
|
||||||
const [showFullDescription, setShowFullDescription] = useState(false);
|
const [showFullDescription, setShowFullDescription] = useState(false);
|
||||||
|
|
||||||
useLayoutEffect(() => {
|
useEffect(() => {
|
||||||
if (!textRef || !textRef.current) {
|
if (!textRef || !textRef.current) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue