From dc65d4c8e02a1f73e4fb47ec77fc2e9349b7b6b2 Mon Sep 17 00:00:00 2001 From: Nikita Date: Wed, 25 Sep 2024 02:30:36 +0300 Subject: [PATCH] 0.5 done --- .../ProductDetails/RecommendedList/RecommendedList.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/ProductDetails/RecommendedList/RecommendedList.tsx b/src/components/ProductDetails/RecommendedList/RecommendedList.tsx index 43053f8..8af04a1 100644 --- a/src/components/ProductDetails/RecommendedList/RecommendedList.tsx +++ b/src/components/ProductDetails/RecommendedList/RecommendedList.tsx @@ -16,7 +16,9 @@ export const RecommendedList = () => { useEffect(() => { getProducts().then(products => { - setCurrentProductList(products); + setCurrentProductList( + products.filter(product => !pathname.includes(product.id)), + ); }); }, []);