import { useTranslation } from "react-i18next"; interface Entry { username: string; displayName: string | null; domain: string; } interface Props { kind: "followers" | "following"; user: { username: string; displayName: string | null }; entries: Entry[]; page: number; total: number; } const PAGE_SIZE = 50; export function CollectionPage({ kind, user, entries, page, total }: Props) { const { t } = useTranslation("journal"); const totalPages = Math.max(1, Math.ceil(total / PAGE_SIZE)); const heading = t(`social.${kind}.heading`, { user: user.displayName ?? user.username, }); return (
{t(`social.${kind}.count`, { count: total })}
{entries.length === 0 ? ({t(`social.${kind}.empty`)}
) : (