"use client"; import { useTranslations } from "next-intl"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; interface Registration { id: number; userId: number; username: string; createdAt: Date; } interface Props { registrations: Registration[]; } export function EventRegistrations({ registrations }: Props) { const t = useTranslations("pages.admin.events"); return ( {t("registrationsTitle", { count: registrations.length })} {registrations.length === 0 ? (
{t("noRegistrations")}
) : (
{registrations.map((r) => (
{r.username} {new Date(r.createdAt).toLocaleString()}
))}
)}
); }