Files
oh-my-opencode/web/components/landing/hero-stats.tsx
T
YeonGyu-Kim f94714bbdf feat(web): import oh-my-openagent-web Next.js + Cloudflare Workers site
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.
2026-05-08 13:35:00 +09:00

51 lines
1.6 KiB
TypeScript

"use client"
import type { ReactNode } from "react"
import { Star, Bot, Download, GitBranch } from "lucide-react"
import { useLiveStats } from "./live-stats"
interface HeroStatsProps {
initialStats: {
stars: string
totalDownloads: string
monthlyDownloads: string
weeklyDownloads: string
}
labels: {
githubStars: string
specializedAgents: string
totalDownloads: string
monthlyDownloads: string
lifecycleHooks: string
}
}
export function HeroStats({ initialStats, labels }: HeroStatsProps): ReactNode {
const stats = useLiveStats(initialStats)
return (
<div className="flex flex-wrap justify-center gap-4 text-sm text-zinc-300 md:gap-8 md:text-base">
<div className="flex items-center gap-2">
<Star className="h-5 w-5 fill-yellow-400 text-yellow-400" />
<span>{labels.githubStars.replace("{count}", stats.stars)}</span>
</div>
<div className="flex items-center gap-2">
<Bot className="h-5 w-5 text-cyan-400" />
<span>{labels.specializedAgents}</span>
</div>
<div className="flex items-center gap-2">
<Download className="h-5 w-5 text-green-400" />
<span>{labels.totalDownloads.replace("{count}", stats.totalDownloads)}</span>
</div>
<div className="flex items-center gap-2">
<Download className="h-5 w-5 text-emerald-400" />
<span>{labels.monthlyDownloads.replace("{count}", stats.monthlyDownloads)}</span>
</div>
<div className="flex items-center gap-2">
<GitBranch className="h-5 w-5 text-purple-400" />
<span>{labels.lifecycleHooks}</span>
</div>
</div>
)
}