--- import { Image } from "astro:assets"; import type { WebmentionsChildren } from "@/types"; interface Props { mentions: WebmentionsChildren[]; } const { mentions } = Astro.props; const MAX_LIKES = 10; const likes = mentions.filter((mention) => mention["wm-property"] === "like-of"); const likesToShow = likes .filter((like) => like.author?.photo && like.author.photo !== "") .slice(0, MAX_LIKES); --- { !!likes.length && (

{likes.length} {likes.length > 1 ? " People" : " Person"} liked this

{!!likesToShow.length && ( )}
) }