Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ReactionsAnimations.tsx 992B

1234567891011121314151617181920212223242526272829
  1. import React from 'react';
  2. import { useSelector } from 'react-redux';
  3. import { getReactionsQueue, isReactionsEnabled, shouldDisplayReactionsButtons } from '../../functions.any';
  4. import ReactionEmoji from './ReactionEmoji';
  5. /**
  6. * Renders the reactions animations in the case when there is no buttons displayed.
  7. *
  8. * @returns {ReactNode}
  9. */
  10. export default function ReactionAnimations() {
  11. const reactionsQueue = useSelector(getReactionsQueue);
  12. const _shouldDisplayReactionsButtons = useSelector(shouldDisplayReactionsButtons);
  13. const reactionsEnabled = useSelector(isReactionsEnabled);
  14. if (reactionsEnabled && !_shouldDisplayReactionsButtons) {
  15. return (<div className = 'reactions-animations-container'>
  16. {reactionsQueue.map(({ reaction, uid }, index) => (<ReactionEmoji
  17. index = { index }
  18. key = { uid }
  19. reaction = { reaction }
  20. uid = { uid } />))}
  21. </div>);
  22. }
  23. return null;
  24. }