From d8a2ca7d0ad9afdd01c654bea29b2a6c2b92ff2c Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 3 Sep 2020 19:57:49 +0800 Subject: ... --- .../ClientApp/src/app/views/user/UserInfoCard.tsx | 23 ++-------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'Timeline/ClientApp/src/app/views/user') diff --git a/Timeline/ClientApp/src/app/views/user/UserInfoCard.tsx b/Timeline/ClientApp/src/app/views/user/UserInfoCard.tsx index f1878b5c..cec81421 100644 --- a/Timeline/ClientApp/src/app/views/user/UserInfoCard.tsx +++ b/Timeline/ClientApp/src/app/views/user/UserInfoCard.tsx @@ -17,34 +17,15 @@ export type UserInfoCardProps = TimelineCardComponentProps< >; const UserInfoCard: React.FC = (props) => { - const { onHeight, onManage } = props; + const { onManage } = props; const { t } = useTranslation(); const avatar = useAvatar(props.timeline.owner.username); - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const containerRef = React.useRef(null!); - - const notifyHeight = React.useCallback((): void => { - if (onHeight) { - onHeight(containerRef.current.getBoundingClientRect().height); - } - }, [onHeight]); - - React.useEffect(() => { - const subscription = fromEvent(window, "resize").subscribe(notifyHeight); - return () => subscription.unsubscribe(); - }); - return ( -
+
-- cgit v1.2.3