"use client"; import { ReactNode } from "react"; import Link from "next/link"; import { useFormatter, useTranslations } from "next-intl"; import { usePageUrlGenerator } from "../../../client"; type Sibling = { howToType: string; slug: string; title: string }; export function HelpArticleBody(props: { howToType: string; title: string; summary?: string; updatedAt?: string; prev?: Sibling | null; next?: Sibling | null; children: ReactNode; }) { const t = useTranslations(); const format = useFormatter(); const generateUrl = usePageUrlGenerator(); const { howToType, title, summary, updatedAt, prev, next, children } = props; return (

{title}

{summary ?

{summary}

: null} {children}
{updatedAt ? (
{t("help.article.lastUpdated", { date: format.dateTime(new Date(updatedAt), { dateStyle: "short" }), })}
) : null}
{prev ? ( ← {t("help.article.previous")}: {prev.title} ) : ( )} {next ? ( {t("help.article.next")}: {next.title} → ) : ( )}
); }