import type { Metadata } from "next" import { getTranslations, getMessages, setRequestLocale } from "next-intl/server" import { Link } from "@/i18n/navigation" import { DocHeader } from "@/components/ui/doc-header" import { Callout } from "@/components/ui/callout" export async function generateMetadata({ params, }: { params: Promise<{ locale: string }> }): Promise { const { locale } = await params const t = await getTranslations({ locale, namespace: "docs.monitor.dashboard.meta" }) return { title: t("title"), description: t("description"), } } type TabRow = { name: string; linksTo?: string; owns: string } type WhereNextItem = { label: string; href: string; tail: string } export default async function DashboardIndexPage({ params, }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations({ locale, namespace: "docs.monitor.dashboard" }) const messages = (await getMessages({ locale })) as unknown as { docs: { monitor: { dashboard: { tabs: { rows: TabRow[] } headerAnatomy: { items: string[] } whereNext: { items: WhereNextItem[] } } } } } const tabRows = messages.docs.monitor.dashboard.tabs.rows const headerAnatomyItems = messages.docs.monitor.dashboard.headerAnatomy.items const whereNextItems = messages.docs.monitor.dashboard.whereNext.items const code = (chunks: React.ReactNode) => {chunks} const strong = (chunks: React.ReactNode) => {chunks} const em = (chunks: React.ReactNode) => {chunks} const link = (chunks: React.ReactNode) => ( {chunks} ) return (
{t.rich("oneHeader.body", { link })}

{t("tabs.heading")}

{t("tabs.intro")}

{tabRows.map((row, idx) => ( ))}
{t("tabs.headerTab")} {t("tabs.headerOwns")}
{row.linksTo ? ( {row.name} ) : ( {row.name} )} {t.rich(`tabs.rows.${idx}.owns`, { code })}

{t("headerAnatomy.heading")}

    {headerAnatomyItems.map((_, idx) => (
  • {t.rich(`headerAnatomy.items.${idx}`, { code, strong, em })}
  • ))}

{t("whereNext.heading")}

    {whereNextItems.map((item) => (
  • {item.label} {item.tail}
  • ))}
) }