| 1 | /** |
| 2 | * PluginGuidePage - 浏览器插件图文教学页面 |
| 3 | * 用于指导用户安装和使用 AiToEarn 浏览器插件 |
| 4 | */ |
| 5 | import type { Metadata } from 'next' |
| 6 | import { useTranslation } from '@/app/i18n' |
| 7 | import { fallbackLng, languages } from '@/app/i18n/settings' |
| 8 | import { getMetadata } from '@/utils/metadata' |
| 9 | import PluginGuideContent from './PluginGuideContent' |
| 10 | |
| 11 | export async function generateMetadata({ |
| 12 | params, |
| 13 | }: { |
| 14 | params: Promise<{ lng: string }> |
| 15 | }): Promise<Metadata> { |
| 16 | let { lng } = await params |
| 17 | if (!languages.includes(lng)) |
| 18 | lng = fallbackLng |
| 19 | const { t } = await useTranslation(lng, 'pluginGuide') |
| 20 | |
| 21 | return getMetadata( |
| 22 | { |
| 23 | title: t('seo.title'), |
| 24 | description: t('seo.description'), |
| 25 | keywords: t('seo.keywords'), |
| 26 | }, |
| 27 | lng, |
| 28 | '/websit/plugin-guide', |
| 29 | ) |
| 30 | } |
| 31 | |
| 32 | export default function PluginGuidePage() { |
| 33 | return <PluginGuideContent /> |
| 34 | } |
| 35 |