Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
jitsi-meet/react/features/polls/components/web/PollItem.js

36 lines
728 B

// @flow
import React from 'react';
import { useSelector } from 'react-redux';
import { PollAnswer, PollResults } from '..';
import { shouldShowResults } from '../../functions';
type Props = {
/**
* Id of the poll.
*/
pollId: string,
}
const PollItem = React.forwardRef<Props, HTMLElement>(({ pollId }: Props, ref) => {
const showResults = useSelector(shouldShowResults(pollId));
return (
<div ref = { ref }>
{ showResults
? <PollResults
key = { pollId }
pollId = { pollId } />
: <PollAnswer
pollId = { pollId } />
}
</div>
);
});
export default PollItem;