fix: pass currency in formatNumberIntoCurrency method
This commit is contained in:
parent
1c4f37e989
commit
431f45fea2
@ -94,12 +94,12 @@ export function secondsToDuration(seconds) {
|
|||||||
return `${hours}h ${minutes}m ${_seconds}s`
|
return `${hours}h ${minutes}m ${_seconds}s`
|
||||||
}
|
}
|
||||||
|
|
||||||
export function formatNumberIntoCurrency(value) {
|
export function formatNumberIntoCurrency(value, currency = 'INR') {
|
||||||
if (value) {
|
if (value) {
|
||||||
return value.toLocaleString('en-IN', {
|
return value.toLocaleString('en-IN', {
|
||||||
maximumFractionDigits: 2,
|
maximumFractionDigits: 0,
|
||||||
style: 'currency',
|
style: 'currency',
|
||||||
currency: 'INR',
|
currency: currency ? currency : 'INR',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user