p2p poll logic added
This commit is contained in:
22
components/PollActive.tsx
Normal file
22
components/PollActive.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
"use client";
|
||||
|
||||
import PollOption from "./PollOption";
|
||||
|
||||
export default function PollActive({ pollManager, peerId }: any) {
|
||||
const poll = pollManager.poll;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h2 className="text-xl font-bold">{poll.question}</h2>
|
||||
|
||||
{poll.options.map((opt: any) => (
|
||||
<PollOption
|
||||
key={opt.id}
|
||||
option={opt}
|
||||
pollManager={pollManager}
|
||||
peerId={peerId}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user