返回 CodeWhale
page.tsx
根目录 / web / app / [locale] / docs / pet / page.tsx
1 import Image from "next/image";
2 import { DocArticle } from "../_components/doc-article";
3 import { getDocsPet } from "@/lib/i18n/dictionaries";
4 import { buildPageMetadata } from "@/lib/page-meta";
5
6 export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }) {
7 const { locale } = await params;
8 const t = getDocsPet(locale);
9 return buildPageMetadata({
10 path: "/docs/pet",
11 locale,
12 title: t.metaTitle,
13 description: t.metaDescription,
14 });
15 }
16
17 export default async function PetPage({ params }: { params: Promise<{ locale: string }> }) {
18 const { locale } = await params;
19 return (
20 <>
21 <Image
22 unoptimized
23 src="/brand/pixel-whale.webp"
24 alt=""
25 width={966}
26 height={865}
27 className="mx-auto mb-6 h-auto w-32 [image-rendering:pixelated]"
28 />
29 <DocArticle t={getDocsPet(locale)} locale={locale} />
30 </>
31 );
32 }
33
33 lines Plain Text