This commit is contained in:
@ -17,7 +17,11 @@ export const useFavorites = () => {
|
||||
function mapApiFavorite(item) {
|
||||
const info = item.propertyInformation || {};
|
||||
let details = {};
|
||||
try { details = JSON.parse(info.detailsJSON || '{}'); } catch {}
|
||||
if (typeof info.detailsJSON === 'object' && info.detailsJSON) {
|
||||
details = info.detailsJSON;
|
||||
} else {
|
||||
try { details = JSON.parse(info.detailsJSON || '{}'); } catch {}
|
||||
}
|
||||
|
||||
const price = item.monthlyRent || item.dailyRent || 0;
|
||||
const priceUnit = item.monthlyRent ? 'monthly' : 'daily';
|
||||
|
||||
Reference in New Issue
Block a user