interface LikeButtonProps

Passed to LikeButton by CommentNode, with the state and the functions of WSContext.

Properties

commentId: string
count: number

The socket's live count if it has one, else the comment's likeCount.

liked: boolean
optional
disabled: boolean

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

onLike: (
commentId: string,
shownCount?: number
) => void

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

onUnlike: (
commentId: string,
shownCount?: number
) => void

Called with count, as onLike is.

Usage

import { type LikeButtonProps } from "src/components/social/LikeButton.tsx";