We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc222bd commit 8bc7618Copy full SHA for 8bc7618
src/pages/LandingPage.jsx
@@ -117,7 +117,7 @@ function LandingPage() {
117
},
118
credentials: "include",
119
body: JSON.stringify({
120
- product_id: item.id,
+ product_id: item.product_id,
121
quantity: 1,
122
}),
123
}
@@ -154,7 +154,7 @@ function LandingPage() {
154
155
);
156
const data = await response.json();
157
- setTrendItems(data.data);
+ setTrendItems(data.trend);
158
} catch (error) {
159
console.error("Error fetching trends:", error);
160
@@ -189,7 +189,7 @@ function LandingPage() {
189
/>
190
</UserContainer>
191
<TrendContainer>
192
- {Array.isArray(trendItems.trend) &&
+ {Array.isArray(trendItems) &&
193
trendItems.map((item) => (
194
<CurrentPriceItem
195
key={item.product_id}
0 commit comments