import type { Post } from "../../../types/post"; import { useLightbox } from "../overlays/ImageLightbox"; import { autolink } from "../utils/autolink"; export function ImageWithTextBubble({ post }: { post: Post }) { const { openLightbox } = useLightbox(); const att = post.attachments[0]; if (!att) return null; const ratio = att.width && att.height ? `${att.width} / ${att.height}` : "4 / 3"; return (
{post.text ? (
{autolink(post.text)}
) : null}
); }