import CreatedAgoBadge from "@components/badges/created-ago-badge" import ExpirationBadge from "@components/badges/expiration-badge" import VisibilityBadge from "@components/badges/visibility-badge" import Link from "@components/link" import Skeleton from "@components/skeleton" import styles from "./title.module.css" type TitleProps = { title: string loading?: boolean displayName?: string visibility?: string createdAt?: Date expiresAt?: Date authorId?: string } export const PostTitle = ({ title, displayName, visibility, createdAt, expiresAt, loading, authorId }: TitleProps) => { return (

{title}{" "} by{" "} {displayName || "anonymous"}

{!loading && ( {visibility && } {createdAt && } {expiresAt && } )} {loading && ( )}
) }