MediaSFU ReactJS
    Preparing search index...

    Function pollUpdated

    • Updates the poll state based on the provided data.

      Parameters

      • options: PollUpdatedOptions

        The options for updating the poll.

        • data: PollUpdatedData
        • polls: Poll[]
        • poll: Poll
        • member: string
        • islevel: string
        • OptionalshowAlert?: ShowAlert
        • updatePolls: (polls: Poll[]) => void
        • updatePoll: (poll: Poll) => void
        • updateIsPollModalVisible: (isVisible: boolean) => void

      Returns Promise<void>

      A promise that resolves when the poll update is complete.

      await pollUpdated({
      data: { poll: updatedPoll, status: "started" },
      polls: currentPolls,
      poll: currentPoll,
      member: "user123",
      islevel: "1",
      showAlert: (alert) => console.log(alert.message),
      updatePolls: (polls) => setPolls(polls),
      updatePoll: (poll) => setCurrentPoll(poll),
      updateIsPollModalVisible: (visible) => setIsPollModalVisible(visible),
      });