feat(api, i18n): add agent_node_id to various admin queries and enhance multi-language support
Introduced the agent_node_id field in AdminDrawListQuery, AdminPlayerListQuery, AdminSettlementBatchListQuery, TicketItemsListQuery, and TransferOrderListQuery to improve filtering capabilities. Updated the admin-breadcrumb and admin-sidebar components to include new translations for agent-related terms in English, Nepali, and Chinese, enhancing the overall user experience and multi-language support across the admin interface.
This commit is contained in:
12
src/hooks/use-translation-ref.ts
Normal file
12
src/hooks/use-translation-ref.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
"use client";
|
||||
|
||||
import { useRef } from "react";
|
||||
import { useTranslation, type UseTranslationOptions } from "react-i18next";
|
||||
|
||||
/** 稳定引用 i18n `t`,避免放进 useCallback/useEffect 依赖导致重复请求 */
|
||||
export function useTranslationRef(ns?: string | string[], options?: UseTranslationOptions<string>) {
|
||||
const { t } = useTranslation(ns, options);
|
||||
const tRef = useRef(t);
|
||||
tRef.current = t;
|
||||
return tRef;
|
||||
}
|
||||
Reference in New Issue
Block a user