// @flow import React, { useCallback } from 'react'; import { Image, View } from 'react-native'; import { useSelector } from 'react-redux'; import { ColorSchemeRegistry } from '../../../base/color-scheme'; import { isGifEnabled } from '../../../gifs/functions'; import { navigate } from '../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef'; import { screen } from '../../../mobile/navigation/routes'; import { REACTIONS } from '../../constants'; import RaiseHandButton from './RaiseHandButton'; import ReactionButton from './ReactionButton'; /** * The type of the React {@code Component} props of {@link ReactionMenu}. */ type Props = { /** * Used to close the overflow menu after raise hand is clicked. */ onCancel: Function, /** * Whether or not it's displayed in the overflow menu. */ overflowMenu: boolean }; /** * Animated reaction emoji. * * @returns {ReactElement} */ function ReactionMenu({ onCancel, overflowMenu }: Props) { const _styles = useSelector(state => ColorSchemeRegistry.get(state, 'Toolbox')); const gifEnabled = useSelector(isGifEnabled); const openGifMenu = useCallback(() => { navigate(screen.conference.gifsMenu); onCancel(); }, []); return ( {Object.keys(REACTIONS).map(key => ( ))} {gifEnabled && ( )} ); } export default ReactionMenu;