fix: access property via propertyInformation nested object
All checks were successful
Build frontend / build (push) Successful in 48s
All checks were successful
Build frontend / build (push) Successful in 48s
This commit is contained in:
@ -276,7 +276,7 @@ export default function OwnerReservationRequestsPage() {
|
|||||||
if (!r.property && r.propertyId) {
|
if (!r.property && r.propertyId) {
|
||||||
try {
|
try {
|
||||||
const propRes = await getRentProperty(r.propertyId);
|
const propRes = await getRentProperty(r.propertyId);
|
||||||
r.property = propRes?.data || propRes || null;
|
r.property = propRes?.data?.propertyInformation || propRes?.data || propRes || null;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn('Failed to load property', r.propertyId);
|
console.warn('Failed to load property', r.propertyId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -236,7 +236,7 @@ export default function UserReservationsPage() {
|
|||||||
if (!r.property && r.propertyId) {
|
if (!r.property && r.propertyId) {
|
||||||
try {
|
try {
|
||||||
const propRes = await getRentProperty(r.propertyId);
|
const propRes = await getRentProperty(r.propertyId);
|
||||||
r.property = propRes?.data || propRes || null;
|
r.property = propRes?.data?.propertyInformation || propRes?.data || propRes || null;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn('Failed to load property', r.propertyId);
|
console.warn('Failed to load property', r.propertyId);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user