Skip to content

Commit

Permalink
fix num of roioms
Browse files Browse the repository at this point in the history
  • Loading branch information
Dujota committed Nov 23, 2024
1 parent b4b12b7 commit 739e112
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/seo/structuredData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export function createListingStructuredData(listing: any, type: 'listing' | 'ren
},
},
numberOfRooms: (listing.bedrooms || 0) + (listing.bathrooms || 0),
bedrooms: listing.bedrooms,
bathrooms: listing.bathrooms,
numberOfBedrooms: listing.bedrooms,
numberOfFullBathrooms: listing.bathrooms,
permittedUsage: 'Perfectly suitable for a family with kids.',
petsAllowed: 'Pets are allowed, but check with agent on any additional restrictions',
leaseLength: {
Expand Down Expand Up @@ -170,8 +170,8 @@ export function createListingCollectionStructuredData(listings: Listing[], pageT
}),
...((listing.bedrooms || listing.bathrooms) && {
numberOfRooms: (listing.bedrooms || 0) + (listing.bathrooms || 0),
...(listing.bedrooms && { bedrooms: listing.bedrooms }),
...(listing.bathrooms && { bathrooms: listing.bathrooms }),
...(listing.bedrooms && { numberOfBedrooms: listing.bedrooms }),
...(listing.bathrooms && { numberOfFullBathrooms: listing.bathrooms }),
}),
...(listing.area && {
floorSize: {
Expand Down

0 comments on commit 739e112

Please sign in to comment.