--- import { Image } from "astro:assets"; import { t } from "@/i18n/translations"; import type { WebmentionsChildren } from "@/types"; interface Props { mentions: WebmentionsChildren[]; language?: string | undefined; } const { mentions, language } = 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 ? t(language, "peopleLiked") : t(language, "personLiked")}

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