Renders a dump as a tile of the "journal" tab's mosaic.
I
JournalCardProps
Passed to JournalCard by JournalFeed, with the vote state Index
takes from WSContext, as for DumpCard.
- canVote: boolean
-
castVote: () => voidid: string,shownCount?: number
- dump: Dump
-
isOwner: boolean
Hides the unread dot and shows the "private" badge.
-
removeVote: () => voidid: string,shownCount?: number
-
shape: JournalShape
From
composeJournal. It sets the tile's grid span, not its look. -
voteCount: number
The socket's live count if it has one, else
dump.voteCount. - voted: boolean
v
JournalCard: React.MemoExoticComponent<(props: JournalCardProps) => React.JSX.Element>
Renders a dump as an image, a pull-quote or a text tile, depending on
whether it has a thumbnail or a note. Clicking an image tile plays its media
when it can, a link's or an uploaded audio or video file, and pauses a file
once it plays; any other tile opens the dump. It is memoized like
DumpCard, so its vote callbacks must be stable.
Usage
import * as mod from "src/components/dump/JournalCard.tsx";