jitsi-meet/react/features/reactions/components/web/ReactionsAnimations.tsx
theluyuan 38ba663466
Some checks failed
Close stale issues and PRs / stale (push) Has been cancelled
init
2025-09-02 14:49:16 +08:00

30 lines
992 B
TypeScript

import React from 'react';
import { useSelector } from 'react-redux';
import { getReactionsQueue, isReactionsEnabled, shouldDisplayReactionsButtons } from '../../functions.any';
import ReactionEmoji from './ReactionEmoji';
/**
* Renders the reactions animations in the case when there is no buttons displayed.
*
* @returns {ReactNode}
*/
export default function ReactionAnimations() {
const reactionsQueue = useSelector(getReactionsQueue);
const _shouldDisplayReactionsButtons = useSelector(shouldDisplayReactionsButtons);
const reactionsEnabled = useSelector(isReactionsEnabled);
if (reactionsEnabled && !_shouldDisplayReactionsButtons) {
return (<div className = 'reactions-animations-container'>
{reactionsQueue.map(({ reaction, uid }, index) => (<ReactionEmoji
index = { index }
key = { uid }
reaction = { reaction }
uid = { uid } />))}
</div>);
}
return null;
}