---
import Date from "@components/organisms/Date.astro";
import KeywordsList from "@components/organisms/KeywordsList.astro";
import { getFirstUserID, getLastUpdate } from "@lib/collection/helpers";
import type { Micro, MicroEntry } from "@lib/collection/schemas";
interface Props extends MicroEntry {}
const micro = Astro.props;
const { id, data, rendered } = micro;
const { title, lang, keywords } = data;
const date = getLastUpdate(micro);
const user = await getFirstUserID(micro);
const display = user?.name ?? user?.email ?? user?.entity ?? "";
const [first, ...names] = display.split(/\s/);
const last = names.length > 0 ? names[names.length - 1] : "";
const little = ((first?.[0] ?? "") + (last?.[0] ?? "")).slice(0, 2);
---
{
user?.website ? {little} : (
{little}
)
}
{first} {last}
ยท