feat: 更新网站配置和内容,优化国际化设置
refactor: 重构产线页面和路由,移除无用代码 style: 调整内容格式和样式,统一中英文标点 docs: 更新产品描述和元数据,完善多语言支持
This commit is contained in:
@@ -130,16 +130,16 @@ export default async function ProductDetailPage({ params }: { params: Params })
|
||||
export async function generateStaticParams() {
|
||||
try {
|
||||
const defaultLocale = LOCALES[0];
|
||||
const workShops: Line[] = await getLines(defaultLocale);
|
||||
const lines: Line[] = await getLines(defaultLocale);
|
||||
|
||||
return LOCALES.flatMap((locale) =>
|
||||
workShops.map((workShop) => ({
|
||||
lines.map((line) => ({
|
||||
locale,
|
||||
slug: workShop.slug as string,
|
||||
slug: line.slug as string,
|
||||
}))
|
||||
);
|
||||
} catch (error) {
|
||||
console.error("生成产品静态参数失败:", error);
|
||||
console.error("生成产线静态参数失败:", error);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ type MetadataProps = {
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: MetadataProps): Promise<Metadata> {
|
||||
const { locale } = params;
|
||||
const { locale } = await params;
|
||||
const t = await getTranslations({ locale, namespace: "Workshop" });
|
||||
|
||||
return constructMetadata({
|
||||
|
||||
Reference in New Issue
Block a user