Fix TypeScript errors in additional-service module
Updated 24 files to resolve 111 TypeScript compilation errors by: - Updating imports from direct constant exports to getter functions - Adding i18n support with useTranslation hook - Fixing curried function calls to use translation function parameter - Adding explicit type annotations to map callbacks All filter components, list wrappers, and page components now properly use internationalized getter functions for status text and button groups. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,7 @@ import { ListDateGroup } from '../list-date-group';
|
||||
import { AdditionalServiceCategory } from '../../model/types';
|
||||
import { SortTypeBox } from '@/entities/common/ui/sort-type-box';
|
||||
import { useExtensionFundAccountTransferExcelMutation } from '../../api/fund-account/use-extension-fund-account-transfer-excel-mutation';
|
||||
import { FundAccountStatusBtnGroup } from '../../model/fund-account/constant';
|
||||
import { getFundAccountStatusBtnGroup } from '../../model/fund-account/constant';
|
||||
import { useExtensionFundAccountBalanceMutation } from '../../api/fund-account/use-extension-fund-account-balance-mutation';
|
||||
import { NumericFormat } from 'react-number-format';
|
||||
import { FundAccountTransactionFilter } from '../filter/fund-account-trnasaction-filter';
|
||||
@@ -27,9 +27,11 @@ import { PATHS } from '@/shared/constants/paths';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
import { EmailBottomSheet } from '@/entities/common/ui/email-bottom-sheet';
|
||||
import useIntersectionObserver from '@/widgets/intersection-observer';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export const FundAccountTransferListWrap = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const { t } = useTranslation();
|
||||
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
@@ -283,7 +285,7 @@ export const FundAccountTransferListWrap = () => {
|
||||
<div className="excrow mr-0">
|
||||
<div className="full-menu-keywords no-padding">
|
||||
{
|
||||
FundAccountStatusBtnGroup.map((value, index) => (
|
||||
getFundAccountStatusBtnGroup(t).map((value: any, index: number) => (
|
||||
<span
|
||||
key={`key-service-code=${index}`}
|
||||
className={`keyword-tag ${(status === value.value) ? 'active' : ''}`}
|
||||
|
||||
Reference in New Issue
Block a user