f94714bbdf
Imports the public marketing site previously living in ../oh-my-opencode-web. Independent of the npm plugin: own package.json, bun.lock, tsconfig.json. Not included in the published package — root files: array still only ships dist/, bin/, postinstall.mjs. Stack: - Next.js 15.5 App Router + RSC, deployed to Cloudflare Workers via @opennextjs/cloudflare (build target .open-next/worker.js). - Tailwind v4 + shadcn/ui primitives. - next-intl with 4 locales (en/ja/ko/zh) under app/[locale]/. - Playwright e2e tests under web/e2e/. - Custom domains ohmyopenagent.com (primary) and ohmyopencode.org (legacy alias) declared in web/wrangler.toml. Source files were re-formatted via `bun run format` to bring them in line with the existing .prettierrc (singleQuote: false). Functional code unchanged.
35 lines
985 B
TypeScript
35 lines
985 B
TypeScript
import type { Metadata } from "next"
|
|
import type { JSX } from "react"
|
|
import { notFound } from "next/navigation"
|
|
import { hasLocale } from "next-intl"
|
|
import { setRequestLocale } from "next-intl/server"
|
|
import { LocalizedPageShell } from "@/app/_components/localized-page-shell"
|
|
import { routing } from "@/i18n/routing"
|
|
|
|
export const metadata: Metadata = {
|
|
description:
|
|
"Meet Sisyphus: The batteries-included agent that codes like you. Multi-model orchestration, background agents, 40+ lifecycle hooks.",
|
|
}
|
|
|
|
export function generateStaticParams() {
|
|
return routing.locales.map((locale) => ({ locale }))
|
|
}
|
|
|
|
export default async function LocaleLayout({
|
|
children,
|
|
params,
|
|
}: {
|
|
children: React.ReactNode
|
|
params: Promise<{ locale: string }>
|
|
}): Promise<JSX.Element> {
|
|
const { locale } = await params
|
|
|
|
if (!hasLocale(routing.locales, locale)) {
|
|
notFound()
|
|
}
|
|
|
|
setRequestLocale(locale)
|
|
|
|
return <LocalizedPageShell locale={locale}>{children}</LocalizedPageShell>
|
|
}
|