2023-01-19 08:59:07 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { useSelector } from 'react-redux';
|
|
|
|
import { makeStyles } from 'tss-react/mui';
|
|
|
|
|
|
|
|
import { getParticipantCount } from '../../../base/participants/functions';
|
|
|
|
import { withPixelLineHeight } from '../../../base/styles/functions.web';
|
|
|
|
|
|
|
|
const useStyles = makeStyles()(theme => {
|
|
|
|
return {
|
|
|
|
badge: {
|
|
|
|
backgroundColor: theme.palette.ui03,
|
|
|
|
borderRadius: '100%',
|
|
|
|
height: '16px',
|
|
|
|
width: '16px',
|
|
|
|
color: theme.palette.text01,
|
|
|
|
...withPixelLineHeight(theme.typography.labelBold),
|
|
|
|
pointerEvents: 'none',
|
|
|
|
position: 'absolute',
|
2023-02-03 11:30:38 +00:00
|
|
|
right: '-4px',
|
|
|
|
top: '-3px'
|
2023-01-19 08:59:07 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
const ParticipantsCounter = () => {
|
|
|
|
const { classes } = useStyles();
|
|
|
|
const participantsCount = useSelector(getParticipantCount);
|
|
|
|
|
|
|
|
return <span className = { classes.badge }>{participantsCount}</span>;
|
|
|
|
};
|
|
|
|
|
|
|
|
export default ParticipantsCounter;
|