Handles the end of a poll by emitting an "endPoll" event through the provided socket. Displays an alert based on the success or failure of the operation.
handleEndPoll({ pollId: "poll123", socket: socketInstance, showAlert: (message) => console.log(message), roomName: "roomA", updateIsPollModalVisible: (isVisible) => setIsPollModalVisible(isVisible),}); Copy
handleEndPoll({ pollId: "poll123", socket: socketInstance, showAlert: (message) => console.log(message), roomName: "roomA", updateIsPollModalVisible: (isVisible) => setIsPollModalVisible(isVisible),});
The options for ending the poll.
Handles the end of a poll by emitting an "endPoll" event through the provided socket. Displays an alert based on the success or failure of the operation.
Example