We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9072bb0 commit e788b96Copy full SHA for e788b96
frontend/src/pages/BestSellingPage.jsx
@@ -14,8 +14,7 @@ const BestSellingPage = () => {
14
useEffect(() => {
15
const allProductsData = allProducts ? [...allProducts] : [];
16
const sortedData = allProductsData?.sort((a,b) => b.sold_out - a.sold_out);
17
- const firstFive = sortedData && sortedData.slice(0, 5);
18
- setData(firstFive);
+ setData(sortedData);
19
}, [allProducts]);
20
21
return (
0 commit comments