21 lines
412 B
JavaScript
21 lines
412 B
JavaScript
export const formatPrice = p => {
|
|
if (isNaN(p)) {
|
|
return 'Po dogovoru'
|
|
}
|
|
|
|
return p.toLocaleString('bs') + ' KM'
|
|
}
|
|
|
|
export const formatFilterNumber = num => {
|
|
if (isNaN(num) || num == null) {
|
|
return ''
|
|
}
|
|
return num
|
|
}
|
|
|
|
export const galleryImageUrl = img =>
|
|
img && img.replace('upload/', 'upload/w_500/')
|
|
|
|
export const listingImageUrl = img =>
|
|
img && img.replace('upload/', 'upload/w_205/')
|