Skip to content

Commit e788b96

Browse files
author
shahriarsajeeb
committed
Best selling page bug fixed done
1 parent 9072bb0 commit e788b96

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

frontend/src/pages/BestSellingPage.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ const BestSellingPage = () => {
1414
useEffect(() => {
1515
const allProductsData = allProducts ? [...allProducts] : [];
1616
const sortedData = allProductsData?.sort((a,b) => b.sold_out - a.sold_out);
17-
const firstFive = sortedData && sortedData.slice(0, 5);
18-
setData(firstFive);
17+
setData(sortedData);
1918
}, [allProducts]);
2019

2120
return (

0 commit comments

Comments
 (0)