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" import CopyableCode from "@/components/CopyableCode" export async function generateMetadata({ params, }: { params: Promise<{ locale: string }> }): Promise { const { locale } = await params const t = await getTranslations({ locale, namespace: "docs.postInstall.customization.meta" }) return { title: t("title"), description: t("description") } } type RelatedItem = { label: string; href: string; tail: string } export default async function PostInstallCustomizationPage({ params, }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations({ locale, namespace: "docs.postInstall.customization" }) const messages = (await getMessages({ locale })) as unknown as { docs: { postInstall: { customization: { banner: { versionItems: string[] } related: { items: RelatedItem[] } } } } } const versionItems = messages.docs.postInstall.customization.banner.versionItems const relatedItems = messages.docs.postInstall.customization.related.items const code = (chunks: React.ReactNode) => {chunks} const strong = (chunks: React.ReactNode) => {chunks} const em = (chunks: React.ReactNode) => {chunks} const uninstallLink = (chunks: React.ReactNode) => ( {chunks} ) return (
{t.rich("intro.body", { strong })}

{t("bashrc.heading")}

{t.rich("bashrc.intro", { code })}

{t("bashrc.writesTitle")}

{t.rich("bashrc.writesOutro", { code })}

{t("bashrc.rootBody")}

{t("motd.heading")}

{t.rich("motd.intro", { em, code })}

{t("motd.writesTitle")}

`} className="my-4" />

{t.rich("motd.writesOutro", { code })}

{t("banner.heading")}

{t.rich("banner.intro", { em })}

{t("banner.versionTitle")}

    {versionItems.map((_, idx) => (
  • {t.rich(`banner.versionItems.${idx}`, { strong, code })}
  • ))}

{t.rich("banner.versionOutro", { code })}

{t.rich("banner.breakBody", { code, link: uninstallLink })} {t.rich("banner.legalBody", { strong })}

{t("verify.heading")}

{t("verify.intro")}

{t.rich("verify.reversibleBody", { code, link: uninstallLink })}

{t("related.heading")}

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