Files
cydweb/app/[locale]/page.tsx
DESKTOP-PUHFO60\dsx2016 ae63378fdb Add CYD browser flasher with Next.js, i18n, and Web Serial install.
Replace the starter app with a public/local flasher that discovers sibling firmwares, supports en/zh, and documents HTTPS deploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-19 19:38:53 +08:00

24 lines
762 B
TypeScript

import { getTranslations, setRequestLocale } from "next-intl/server";
import { FlasherPanel } from "@/components/flasher-panel";
type Props = { params: Promise<{ locale: string }> };
export default async function HomePage({ params }: Props) {
const { locale } = await params;
setRequestLocale(locale);
const t = await getTranslations("hero");
return (
<div className="flex flex-col gap-5">
<section className="animate-rise">
<h1 className="m-0 max-w-[18ch] font-[family-name:var(--font-display)] text-[clamp(1.45rem,3.5vw,1.85rem)] font-bold tracking-tight">
{t("title")}
</h1>
<p className="mt-2 max-w-[42rem] text-[var(--muted)]">{t("lede")}</p>
</section>
<FlasherPanel />
</div>
);
}