From 05f082ef068db05fbf2cdde0665a669828e4a069 Mon Sep 17 00:00:00 2001 From: Mihaela Dumitru Date: Fri, 21 Jul 2023 15:11:11 +0300 Subject: [PATCH] fix(raised-hand) remove duplicate callback (#13598) --- .../components/web/ReactionsMenuButton.tsx | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/react/features/reactions/components/web/ReactionsMenuButton.tsx b/react/features/reactions/components/web/ReactionsMenuButton.tsx index 1d98026dfa..976bd1a78c 100644 --- a/react/features/reactions/components/web/ReactionsMenuButton.tsx +++ b/react/features/reactions/components/web/ReactionsMenuButton.tsx @@ -1,15 +1,11 @@ -import React, { ReactElement, useCallback, useMemo } from 'react'; +import React, { ReactElement, useCallback } from 'react'; import { WithTranslation } from 'react-i18next'; -import { connect, useSelector } from 'react-redux'; +import { connect } from 'react-redux'; -import { createToolbarEvent } from '../../../analytics/AnalyticsEvents'; -import { sendAnalytics } from '../../../analytics/functions'; import { IReduxState, IStore } from '../../../app/types'; import { isMobileBrowser } from '../../../base/environment/utils'; import { translate } from '../../../base/i18n/functions'; import { IconArrowUp, IconFaceSmile } from '../../../base/icons/svg'; -import { raiseHand } from '../../../base/participants/actions'; -import { getLocalParticipant, hasRaisedHand } from '../../../base/participants/functions'; import AbstractButton, { type IProps as AbstractButtonProps } from '../../../base/toolbox/components/AbstractButton'; import ToolboxButtonWithPopup from '../../../base/toolbox/components/web/ToolboxButtonWithPopup'; import { toggleReactionsMenuVisibility } from '../../actions.web'; @@ -120,16 +116,6 @@ function ReactionsMenuButton({ isOpen && toggleReactionsMenu(); }, [ isOpen, toggleReactionsMenu ]); - const localParticipant = useSelector(getLocalParticipant); - const raisedHand = useMemo(() => hasRaisedHand(localParticipant), [ localParticipant ]); - const handleClick = useCallback(() => { - sendAnalytics(createToolbarEvent( - 'raise.hand', - { enable: !raisedHand })); - - dispatch(raiseHand(!raisedHand)); - }, [ raisedHand ]); - if (!showRaiseHand && (!_reactionsButtonEnabled || !_reactionsEnabled)) { return null; } @@ -145,7 +131,6 @@ function ReactionsMenuButton({ ? ( ) : ( ); } else {