interface VoteButtonProps

Passed to VoteButton by DumpCard, JournalCard and the Dump page, with the state and the functions of WSContext.

Properties

dumpId: string
count: number

The socket's live count if it has one, else the dump's voteCount.

voted: boolean
optional
disabled: boolean

Set for a visitor, whom the tooltip asks to log in.

onCast: (
dumpId: string,
shownCount?: number
) => void

Called with count, which WSContext needs until it has a live count.

onRemove: (
dumpId: string,
shownCount?: number
) => void

Called with count, as onCast is.

Usage

import { type VoteButtonProps } from "src/components/social/VoteButton.tsx";