Przejdź do głównej zawartości

Function: useFormatAmount()

useFormatAmount(): (amount, currencyCode, localeOverride?) => string

Memoised formatAmount bound to the active language from <StorefrontProvider>.

Returns​

(amount, currencyCode, localeOverride?) => string

Example​

const formatAmount = useFormatAmount();
return <span>{formatAmount(item.totalPrice.amount, item.totalPrice.currencyCode)}</span>;