Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

RaisedHandsCountLabel.tsx 893B

12345678910111213141516171819202122232425
  1. import React from 'react';
  2. import { useSelector } from 'react-redux';
  3. import { IReduxState } from '../../../app/types';
  4. import { IconRaiseHand } from '../../../base/icons/svg';
  5. import Label from '../../../base/label/components/native/Label';
  6. import BaseTheme from '../../../base/ui/components/BaseTheme.native';
  7. import styles from './styles';
  8. const RaisedHandsCountLabel = () => {
  9. const raisedHandsCount = useSelector((state: IReduxState) =>
  10. (state['features/base/participants'].raisedHandsQueue || []).length);
  11. return raisedHandsCount > 0 ? (
  12. <Label
  13. icon = { IconRaiseHand }
  14. iconColor = { BaseTheme.palette.uiBackground }
  15. style = { styles.raisedHandsCountLabel }
  16. text = { `${raisedHandsCount}` }
  17. textStyle = { styles.raisedHandsCountLabelText } />
  18. ) : null;
  19. };
  20. export default RaisedHandsCountLabel;