Renders the card that shows a dump in the feeds, search results, profiles and playlists.
I
DumpCardProps
Passed to DumpCard by each list of dumps. The vote state comes from
the parent, usually WSContext's passed down through the feed's props.
- canVote: boolean
-
castVote: () => voidid: string,shownCount?: number
- className: string
- dump: Dump
-
isOwner: boolean
Hides the unread dot and shows the "private" badge.
-
removeVote: () => voidid: string,shownCount?: number
-
voteCount: number
The socket's live count if it has one, else
dump.voteCount. - voted: boolean
v
DumpCard: React.MemoExoticComponent<(props: DumpCardProps) => React.JSX.Element>
Renders a dump as a card that opens the dump when clicked. A ctrl-click or
middle click opens it in a new tab (useDumpCardLink). The card is an
<li>, for a <ul>. It is memoized because feeds re-render on every live
event, so its vote callbacks must be stable (WSContext's are).
Usage
import * as mod from "src/components/dump/DumpCard.tsx";