23 lines
424 B
JavaScript
23 lines
424 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/")
|
|
|