refactor(i18n): 将 useTranslation 重命名为 getTranslation 以更准确描述功能

fix(依赖): 添加缺失的依赖项到 useEffect 钩子中
style(env): 更新 .gitignore 和 .env 文件配置
docs(docker): 更新 docker-compose 和文档中的镜像命名
This commit is contained in:
hex2077
2025-08-25 20:45:28 +08:00
parent f64cd498cf
commit 99fad315d0
24 changed files with 113 additions and 98 deletions

View File

@@ -1,11 +1,11 @@
import { NextRequest, NextResponse } from 'next/server';
import { getLanguageFromRequest } from '@/lib/utils';
import { useTranslation } from '@/i18n';
import { getTranslation } from '@/i18n';
import { fetchAndCacheProvidersLocal } from '@/lib/config-local';
export async function GET(request: NextRequest) {
const lang = getLanguageFromRequest(request);
const { t } = await useTranslation(lang, 'errors');
const { t } = await getTranslation(lang, 'errors');
// 获取查询参数
const searchParams = request.nextUrl.searchParams;