返回 AiToEarn
page.tsx
1 /**
2 * AI 生成素材详情页
3 * 展示 AI 生成的所有图片和视频素材(只读模式)
4 */
5
6 import type { Metadata } from 'next'
7 import { useTranslation } from '@/app/i18n'
8 import { fallbackLng, languages } from '@/app/i18n/settings'
9 import { getMetadata } from '@/utils/metadata'
10 import { AgentAssetsPageCore } from './agentAssetsPageCore'
11
12 export async function generateMetadata({
13 params,
14 }: {
15 params: Promise<{ lng: string }>
16 }): Promise<Metadata> {
17 let { lng } = await params
18 if (!languages.includes(lng))
19 lng = fallbackLng
20 const { t } = await useTranslation(lng, 'material')
21
22 return getMetadata(
23 {
24 title: t('agentAssets.title'),
25 description: t('agentAssets.description'),
26 keywords: t('agentAssets.keywords'),
27 },
28 lng,
29 )
30 }
31
32 export default function AgentAssetsPage() {
33 return <AgentAssetsPageCore />
34 }
35
35 lines Plain Text