import { Card } from "@/components/ui/Card"; import { getMyBookings } from "@/lib/api"; import { formatPrice } from "@/lib/utils"; import { getTranslations, setRequestLocale } from "next-intl/server"; export default async function CabinetInvoicesPage({ params, }: { params: Promise<{ locale: string }>; }) { const { locale } = await params; setRequestLocale(locale); const t = await getTranslations("cabinet"); const bookings = await getMyBookings(); return (

{t("invoices")}

{bookings.length === 0 ? (

{t("emptyInvoices")}

) : (
{bookings.map((b) => (

{b.serviceTitle}

{b.datetime}

{formatPrice(b.price, locale)}

{b.paid ? t("paid") : t("unpaid")}

))}
)}
); }