// @flow import React, { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { Text, View } from 'react-native'; import { Button } from 'react-native-paper'; import { useDispatch, useSelector } from 'react-redux'; import { Icon, IconInviteMore } from '../../../base/icons'; import { getParticipants } from '../../../base/participants'; import { doInvitePeople } from '../../../invite/actions.native'; import { shouldRenderInviteButton } from '../../functions'; import { MeetingParticipantItem } from './MeetingParticipantItem'; import styles from './styles'; export const MeetingParticipantList = () => { const dispatch = useDispatch(); const onInvite = useCallback(() => dispatch(doInvitePeople()), [ dispatch ]); const showInviteButton = useSelector(shouldRenderInviteButton); const participants = useSelector(getParticipants); const { t } = useTranslation(); return ( {t('participantsPane.headings.participantsList', { count: participants.length })} { showInviteButton &&