Hiyve Components - v1.0.0
    Preparing search index...

    Return type for the usePollSync hook.

    interface UsePollSyncResult {
        castVote: (pollId: string, optionIds: string[]) => void;
        connected: boolean;
        createPoll: (
            poll: Omit<Poll, "id" | "createdAt" | "results">,
        ) => Poll | null;
        deletePoll: (pollId: string) => void;
        endPoll: (pollId: string) => void;
        shareResults: (pollId: string) => void;
        startPoll: (pollId: string) => void;
        submitTextResponse: (pollId: string, content: string) => void;
    }
    Index

    Properties

    castVote: (pollId: string, optionIds: string[]) => void

    Cast a vote

    connected: boolean

    Whether the client is connected

    createPoll: (poll: Omit<Poll, "id" | "createdAt" | "results">) => Poll | null

    Create a new poll

    deletePoll: (pollId: string) => void

    Delete a poll

    endPoll: (pollId: string) => void

    End a poll

    shareResults: (pollId: string) => void

    Share results with all participants

    startPoll: (pollId: string) => void

    Start a poll (make active)

    submitTextResponse: (pollId: string, content: string) => void

    Submit text response