|
|
@@ -11,6 +11,7 @@ import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
|
|
11
|
11
|
import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
|
|
12
|
12
|
import defaultImage from "../../assets/images/default.png"
|
|
13
|
13
|
import atomeLogo from "../../assets/images/atome.webp"
|
|
|
14
|
+import { isProductInVisibleMenu } from "../../config/menuCollections";
|
|
14
|
15
|
|
|
15
|
16
|
const ProductSelected = () => {
|
|
16
|
17
|
|
|
|
@@ -23,7 +24,9 @@ const ProductSelected = () => {
|
|
23
|
24
|
|
|
24
|
25
|
if (products.length > 0) {
|
|
25
|
26
|
|
|
26
|
|
- let selectedProducts = products.filter(({ selected }) => selected) || []
|
|
|
27
|
+ let selectedProducts = products.filter((product) => (
|
|
|
28
|
+ product.selected && isProductInVisibleMenu(product, products)
|
|
|
29
|
+ )) || []
|
|
27
|
30
|
|
|
28
|
31
|
//sort
|
|
29
|
32
|
selectedProducts = selectedProducts.sort((a, b) => new Date(b.createdAt) - new Date(a.createdAt));
|