Hiyve Components - v1.0.0
    Preparing search index...
    • Polls interface displaying active and closed polls with voting support.

      Room owners can create new polls and close active ones. All participants can vote on active polls. Each poll card shows the question, options with vote bars, and total vote counts.

      Parameters

      Returns Element

      import { Polls } from '@hiyve/rn-collaboration';
      import { usePolls } from '@hiyve/rn-collaboration';

      function PollsPanel() {
      const { polls, createPoll, vote, closePoll } = usePolls({
      localUserId: userId,
      onSendDataMessage: sendData,
      isOwner: true,
      });

      return (
      <Polls
      polls={polls}
      localUserId={userId}
      isOwner={true}
      onCreatePoll={createPoll}
      onVote={vote}
      onClosePoll={closePoll}
      />
      );
      }