---
import type { CollectionEntry } from "astro:content";
import type { Lang } from "../i18n";
import { getUsernameForLang } from "../utils/get_username_for_lang";
type Props = {
lang: Lang;
user: CollectionEntry<"users">;
};
const { user, lang } = Astro.props;
const username = getUsernameForLang(user, lang);
const link = user.data.preferredLink ? user.data.links[user.data.preferredLink]!.link : null;
---
{
link ? (
{username}
) : (
{username}
)
}