Skip to content

Commit 8bc7618

Browse files
committed
fix: last edit..
1 parent bc222bd commit 8bc7618

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pages/LandingPage.jsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function LandingPage() {
117117
},
118118
credentials: "include",
119119
body: JSON.stringify({
120-
product_id: item.id,
120+
product_id: item.product_id,
121121
quantity: 1,
122122
}),
123123
}
@@ -154,7 +154,7 @@ function LandingPage() {
154154
}
155155
);
156156
const data = await response.json();
157-
setTrendItems(data.data);
157+
setTrendItems(data.trend);
158158
} catch (error) {
159159
console.error("Error fetching trends:", error);
160160
}
@@ -189,7 +189,7 @@ function LandingPage() {
189189
/>
190190
</UserContainer>
191191
<TrendContainer>
192-
{Array.isArray(trendItems.trend) &&
192+
{Array.isArray(trendItems) &&
193193
trendItems.map((item) => (
194194
<CurrentPriceItem
195195
key={item.product_id}

0 commit comments

Comments
 (0)