2021-12-22 11:27:28 +00:00
|
|
|
export const isCollectionVisible = (collection, collectionId) =>
|
|
|
|
collection !== null && collection.id === collectionId;
|
2021-02-24 13:21:19 +00:00
|
|
|
|
2021-12-22 11:27:28 +00:00
|
|
|
export const isProductInCollectionVisible = (collection, productId) => {
|
|
|
|
const productsList = collection.products;
|
2021-03-04 14:51:55 +00:00
|
|
|
return (
|
|
|
|
productsList.totalCount !== 0 && productsList.edges[0].node.id === productId
|
|
|
|
);
|
|
|
|
};
|