more-apartments-astro-integration 1.1.0 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,7 +22,7 @@ export async function GET({ request, params }) {
22
22
  });
23
23
  }
24
24
 
25
- const availability = await client.getAvailability(params.id, startDate, endDate);
25
+ const availability = await client.getAvailability(params.slug, startDate, endDate);
26
26
 
27
27
  return new Response(JSON.stringify({ data: availability }), {
28
28
  headers: {
@@ -9,7 +9,7 @@ export async function GET({ request, params }) {
9
9
  };
10
10
 
11
11
  const client = new MoreApartmentsClient(config);
12
- const property = await client.getProperty(params.id);
12
+ const property = await client.getProperty(params.slug);
13
13
 
14
14
  return new Response(JSON.stringify({ data: property }), {
15
15
  headers: {
@@ -10,7 +10,7 @@ interface Props {
10
10
  guests?: number;
11
11
  destination?: string;
12
12
  segment?: string;
13
-
13
+
14
14
  // Display options
15
15
  showBookingWidgets?: boolean;
16
16
  maxResults?: number;
@@ -81,7 +81,7 @@ const hasSearchParams = Object.keys(searchParams).length > 0;
81
81
  ) : (
82
82
  <div class="properties-grid">
83
83
  {properties.map((property) => (
84
- <div class="property-card" key={property.id}>
84
+ <div class="property-card">
85
85
  <div class="property-header">
86
86
  <h3 class="property-name">
87
87
  <a href={`/properties/${property.slug}`}>
@@ -90,20 +90,20 @@ const hasSearchParams = Object.keys(searchParams).length > 0;
90
90
  </h3>
91
91
  <p class="property-type">{property.type}</p>
92
92
  </div>
93
-
93
+
94
94
  <div class="property-details">
95
95
  <div class="location">
96
96
  <span class="city">{property.city}</span>
97
97
  {property.country && <span class="country">, {property.country}</span>}
98
98
  </div>
99
-
99
+
100
100
  <div class="occupancy">
101
- <span>Up to {property.max_occupancy} guests</span>
101
+ <span>Up to {property.max_persons} guests</span>
102
102
  </div>
103
-
103
+
104
104
  {property.description && (
105
105
  <p class="description">
106
- {property.description.length > 150
106
+ {property.description.length > 150
107
107
  ? `${property.description.substring(0, 150)}...`
108
108
  : property.description
109
109
  }
@@ -124,7 +124,7 @@ const hasSearchParams = Object.keys(searchParams).length > 0;
124
124
  />
125
125
  </div>
126
126
  )}
127
-
127
+
128
128
  {!showBookingWidgets && (
129
129
  <div class="property-actions">
130
130
  <a href={`/properties/${property.slug}`} class="view-details-btn">
@@ -306,7 +306,7 @@ const hasSearchParams = Object.keys(searchParams).length > 0;
306
306
  .properties-grid {
307
307
  grid-template-columns: 1fr;
308
308
  }
309
-
309
+
310
310
  .search-details {
311
311
  flex-direction: column;
312
312
  align-items: flex-start;