// @flow import { makeStyles } from '@material-ui/styles'; import React from 'react'; import { useTranslation } from 'react-i18next'; import { hasRaisedHand } from '../../../base/participants'; import { ACTION_TRIGGER, MEDIA_STATE } from '../../constants'; import { useLobbyActions } from '../../hooks'; import LobbyParticipantQuickAction from './LobbyParticipantQuickAction'; import ParticipantItem from './ParticipantItem'; type Props = { /** * If an overflow drawer should be displayed. */ overflowDrawer: boolean, /** * Callback used to open a drawer with admit/reject actions. */ openDrawerForParticipant: Function, /** * Participant reference. */ participant: Object }; const useStyles = makeStyles(theme => { return { button: { marginRight: `${theme.spacing(2)}px` } }; }); export const LobbyParticipantItem = ({ overflowDrawer, participant: p, openDrawerForParticipant }: Props) => { const { id } = p; const [ admit, reject ] = useLobbyActions({ participantID: id }); const { t } = useTranslation(); const styles = useStyles(); return ( {t('lobby.reject') } {t('lobby.admit')} ); };