import { CabinetNav } from "@/components/cabinet/CabinetNav"; import { namedPageMetadata } from "@/lib/page-metadata"; import { me } from "@/lib/api"; import { Link } from "@/i18n/routing"; import { getTranslations, setRequestLocale } from "next-intl/server"; import type { ReactNode } from "react"; export async function generateMetadata({ params, }: { params: Promise<{ locale: string }>; }) { const { locale } = await params; return namedPageMetadata(locale, "cabinet"); } export default async function CabinetLayout({ children, params, }: { children: ReactNode; params: Promise<{ locale: string }>; }) { const { locale } = await params; setRequestLocale(locale); const t = await getTranslations("cabinet"); const auth = await getTranslations("auth"); const user = await me(); if (!user) { return (
{t("loginHint")}
{auth("login")}