From b392b7c7ee0f508a83062160ad807493a42b5ae2 Mon Sep 17 00:00:00 2001 From: Josh Perez <60019601+josh-signal@users.noreply.github.com> Date: Mon, 19 Jul 2021 17:14:41 -0400 Subject: [PATCH] Fix read more for long group descriptions --- ts/components/conversation/GroupDescription.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/components/conversation/GroupDescription.tsx b/ts/components/conversation/GroupDescription.tsx index dc1b19038d8e..86bc4a460301 100644 --- a/ts/components/conversation/GroupDescription.tsx +++ b/ts/components/conversation/GroupDescription.tsx @@ -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; }