better-auth/apps/web/modules/shared/hooks/locale-currency.tsx
 Илья Шалонин 8538ab969a first
2025-10-29 13:43:43 +05:00

11 lines
317 B
TypeScript

import { config } from "@repo/config";
import { useLocale } from "next-intl";
export function useLocaleCurrency() {
const locale = useLocale();
const localeCurrency =
Object.entries(config.i18n.locales).find(([key]) => key === locale)?.[1]
.currency ?? config.i18n.defaultCurrency;
return localeCurrency;
}