import { FlexBox } from '../../atoms/flex-box'; import { Card } from '../../molecules/card'; import { cn } from '../../tools/cn'; import { PostActions } from './components/PostActions'; import { PostContent } from './components/PostContent'; import { PostHead } from './components/PostHead'; import { PostLocked } from './components/PostLocked'; import { LINKED_CARD_CLASS } from './constants'; import type { PostCardProps } from './types'; /** * The one post for the channel, the feed and the post page: free, locked, subscriber and owner * views of text, image and prediction posts. A locked post keeps the header and swaps the body * for the shared LockedTeaser, so locking never changes the feed's rhythm. * * Server-renderable: only a multi-image carousel and a frozen edit's tooltip are client parts. * The handlers (`owner`, `onShare`, `onImageClick`, `onCta`) need a client caller; a server render * passes `href`, `channelHref` and `ctaHref` links instead. */ export function PostCard(props: PostCardProps) { const { author, channelHref, href, publishedAt, now, timeLabel, premium = props.locked ?? false, edited = false, variant = 'compact', predictionLabels, owner, onShare, labels, className, } = props; return ( {props.locked ? ( ) : ( )} ); }