修复首页新闻板块未跟随语言的错误

This commit is contained in:
2026-09-01 23:20:41 +08:00
parent 36c58cdfee
commit c9a8ffba33
3 changed files with 8 additions and 7 deletions
+2 -2
View File
@@ -216,7 +216,7 @@ export async function getNewsBySlug(slug: string, locale: Locale = "zh-CN"): Pro
return items.find((item) => item.slug === slug) ?? null;
}
export async function getLatestNews() {
const items = await getNewsList();
export async function getLatestNews(locale: Locale = "zh-CN") {
const items = await getNewsList(locale);
return items.slice(0, 3);
}