Files
oh-my-opencode/packages/web/app/[locale]/docs/page.tsx
T
2026-05-18 16:44:02 +09:00

28 lines
880 B
TypeScript

import { getTranslations } from "next-intl/server"
import { DocsShell } from "@/components/docs/docs-shell"
import { DOC_SECTIONS } from "@/lib/docs-sections"
import { loadDocSource } from "@/lib/docs-source"
export default async function DocsPage() {
const t = await getTranslations("docs")
const sectionsWithHtml = DOC_SECTIONS.map((section) => ({
...section,
html: loadDocSource(section.file),
}))
return (
<DocsShell
mobileHeader={t("mobileHeader")}
searchPlaceholder={t("searchPlaceholder")}
sections={DOC_SECTIONS.map((s) => ({ id: s.id, title: s.title }))}
>
{sectionsWithHtml.map((section) => (
<section key={section.id} id={section.id} className="scroll-mt-24">
<article className="docs-content" dangerouslySetInnerHTML={{ __html: section.html }} />
</section>
))}
</DocsShell>
)
}