Files
old-kivi/web/lib/helpers.js
Edin Dazdarevic 738720aa13 Use cloudinary
2017-04-10 02:50:40 +02:00

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/")