
* fix failing tests * no retries * add waiting for confirmation msg * remove unused import * fix test for staff * fix test for staff * fix tests for orders * fix tests for channels * fix autocomplete * fix filters * fix filters * fix create shipping method
12 lines
400 B
JavaScript
12 lines
400 B
JavaScript
export function getFormattedCurrencyAmount(amount, currency) {
|
|
const language = window.navigator.userLanguage || window.navigator.language;
|
|
const formattedCurrencyAmount = amount.toLocaleString(language, {
|
|
currency,
|
|
style: "currency"
|
|
});
|
|
return formattedCurrencyAmount;
|
|
}
|
|
|
|
export function getCurrencyAndAmountInString(amount, currency) {
|
|
return `${currency}${amount.toFixed(2)}`;
|
|
}
|