import { useI18n } from "../../../i18n"; import type { Post } from "../../../types/post"; import { useLightbox } from "../overlays/ImageLightbox"; import { AttachmentDownloadPill } from "../AttachmentDownloadPill"; import { BubbleImage } from "../BubbleImage"; import { autolink } from "../utils/autolink"; import { postDisplayText } from "../utils/postText"; export function ImageWithTextBubble({ post }: { post: Post }) { const { openLightbox } = useLightbox(); const { lang } = useI18n(); const att = post.attachments[0]; const text = postDisplayText(post, lang); if (!att) return null; return (
{text ? (
{autolink(text)}
) : null}
); }