first
This commit is contained in:
commit
8538ab969a
434 changed files with 44051 additions and 0 deletions
11
apps/web/modules/shared/hooks/locale-currency.tsx
Normal file
11
apps/web/modules/shared/hooks/locale-currency.tsx
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue