refactor: 更新管理端页面元数据,统一国际化支持,移除冗余代码

This commit is contained in:
2026-05-21 17:27:52 +08:00
parent 26feed3c4f
commit e8a5507411
77 changed files with 1669 additions and 732 deletions

View File

@@ -0,0 +1,37 @@
"use client";
import { useMemo } from "react";
import { useTranslation } from "react-i18next";
/** 与 `common.export.*` 键一致 */
export type ExportLabelKey =
| "drawsList"
| "drawFinance"
| "adminRoles"
| "adminUsers"
| "players"
| "walletTransferOrders"
| "walletTransactions"
| "playerWallets"
| "tickets"
| "settlementBatches"
| "jackpotPayouts"
| "jackpotContributions"
| "riskLockLogs"
| "riskPools"
| "riskIndex"
| "riskPoolDetail"
| "auditLogs"
| "currencies";
export function useExportLabels(key: ExportLabelKey, params?: Record<string, string>) {
const { t } = useTranslation("common");
return useMemo(
() => ({
filename: t(`export.${key}.filename`, params),
sheetName: t(`export.${key}.sheetName`, params),
}),
[key, params, t],
);
}