Files
YeonGyu-Kim 7e0406f4ec fix(web): UX/a11y polish + middleware metadata route fix
- footer.tsx: Discord link → canonical discord.gg/PUwSMR9XNk
  (was outdated invite that 404'd).
- [locale]/layout.tsx: hooks count 40 → 54 (matches AGENTS.md).
- lib/stats.ts:88: drop '!' non-null assertion; use '??' fallback.
  Removes the only '!' in packages/web (project rule).
- nav-header.tsx: hamburger Button size='icon' → explicit h-11 w-11;
  mobile drawer links min-h-11 px-3 rounded-md. WCAG 2.5.5 tap
  target 44x44 minimum.
- install-command.tsx: copy button h-8 w-8 → h-11 w-11 (was 32px,
  below WCAG). Icon stays 16x16; padding fills to 44.
- middleware.ts: matcher excludes opengraph-image, twitter-image,
  icon, apple-icon, manifest.webmanifest, robots.txt, sitemap.xml.
  Previously next-intl redirected /opengraph-image → /en/opengraph-image
  breaking OG previews for crawlers that hit the unlocalized path.
2026-05-20 14:26:09 +09:00

54 lines
1.9 KiB
TypeScript

import type { JSX } from "react"
import { getTranslations } from "next-intl/server"
import { Link } from "@/i18n/routing"
export async function Footer({ locale }: { readonly locale?: string } = {}): Promise<JSX.Element> {
const t = locale
? await getTranslations({ locale, namespace: "footer" })
: await getTranslations("footer")
const currentYear = new Date().getUTCFullYear()
return (
<footer className="border-t border-white/10 bg-black py-12">
<div className="container mx-auto px-4 md:px-6">
<div className="flex flex-col items-center justify-between gap-6 md:flex-row">
<div className="flex flex-col gap-2">
<span className="text-lg font-bold text-white">{t("brand")}</span>
<p className="text-sm text-zinc-400">
{t("copyright", { year: currentYear.toString() })}
</p>
</div>
<div className="flex items-center gap-8 text-sm text-zinc-400">
<a
href="https://github.com/code-yeongyu/oh-my-openagent"
target="_blank"
rel="noopener noreferrer"
className="transition-colors hover:text-cyan-400"
>
{t("github")}
</a>
<a
href="https://discord.gg/PUwSMR9XNk"
target="_blank"
rel="noopener noreferrer"
className="transition-colors hover:text-cyan-400"
>
{t("discord")}
</a>
<Link href="/docs" locale={locale} className="transition-colors hover:text-cyan-400">
{t("documentation")}
</Link>
<Link
href="/manifesto"
locale={locale}
className="transition-colors hover:text-cyan-400"
>
{t("manifesto")}
</Link>
</div>
</div>
</div>
</footer>
)
}