--- import Avatar, { type AvatarSource } from "../Avatar.astro"; import type { DiscourseActivityTopic } from "../../lib/discourse-activity"; import { createAvatarFallback } from "../../lib/avatar-fallback"; type Props = DiscourseActivityTopic; const { title, url, lastActiveAt, replyCount, author, tags } = Astro.props; const authorLabel = author.displayName || author.username; const avatar: AvatarSource = author.avatarUrl ? { url: author.avatarUrl } : createAvatarFallback({ label: authorLabel, colorKey: author.username, emptyInitials: "?", }); const primaryTag = tags[0]; const replyLabel = `${replyCount} ${replyCount === 1 ? "reply" : "replies"}`; ---
  • {title} {authorLabel} {replyLabel} {primaryTag && ( <> #{primaryTag} )}