"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>
  );
}