changes some status
This commit is contained in:
1 parent
cbd17608c1
commit
6e626482f6
15 files changed
+553
-99
No files matched your search
@@ -2,6 +2,7 @@ import { useCallback } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import type { TFunction } from "i18next";
|
||||
import { REGION_LABELS } from "@/constants/regionCodes";
|
||||
import { getOrderTypeLabel } from "@/constants/orderTypes";
|
||||
import type { LocalizedName, OrderType } from "@/features/dashboard/api/analyticsApi";
|
||||
|
||||
// ─── Formatting ───────────────────────────────────────────────────────────────
|
||||
@@ -39,15 +40,7 @@ export function useLocalizedName() {
|
||||
}
|
||||
|
||||
export function orderTypeLabel(type: OrderType | string, t: TFunction): string {
|
||||
const fallback: Record<string, string> = {
|
||||
loan: "Karz sargytlary",
|
||||
loan_paid_off_letter: "Karzyň ýapylandygy",
|
||||
card: "Täze kart",
|
||||
card_pin: "Kart pin",
|
||||
card_rekwizit: "Kart rekwizit",
|
||||
visa_master: "Visa/Master",
|
||||
};
|
||||
return t(`analytics.orderType.${type}`, fallback[type] ?? type);
|
||||
return getOrderTypeLabel(type, t);
|
||||
}
|
||||
|
||||
export function regionLabel(code: string, t: TFunction): string {
|
||||
|
||||
Reference in new issue
Block a user