mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-22 22:30:52 +01:00
allow white colors in color grouping cata layout
This commit is contained in:
parent
f6f22b2961
commit
2b7c54e989
@ -79,15 +79,13 @@ export const CatalogLayoutColorGroupingView : FC<CatalogLayoutColorGroupViewProp
|
|||||||
|
|
||||||
page.offers.sort(sortByColorIndex);
|
page.offers.sort(sortByColorIndex);
|
||||||
|
|
||||||
let selectedColor = 0;
|
|
||||||
|
|
||||||
page.offers.forEach(offer =>
|
page.offers.forEach(offer =>
|
||||||
{
|
{
|
||||||
if(!offer.product) return;
|
if(!offer.product) return;
|
||||||
|
|
||||||
const furniData = offer.product.furnitureData;
|
const furniData = offer.product.furnitureData;
|
||||||
|
|
||||||
if(((!(furniData)) || (!furniData.hasIndexedColor)))
|
if(!furniData || !furniData.hasIndexedColor)
|
||||||
{
|
{
|
||||||
offers.push(offer);
|
offers.push(offer);
|
||||||
}
|
}
|
||||||
@ -101,11 +99,13 @@ export const CatalogLayoutColorGroupingView : FC<CatalogLayoutColorGroupViewProp
|
|||||||
updatedColorableItems.set(name, []);
|
updatedColorableItems.set(name, []);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let selectedColor = 0xFFFFFF;
|
||||||
|
|
||||||
if(furniData.colors)
|
if(furniData.colors)
|
||||||
{
|
{
|
||||||
for(let color of furniData.colors)
|
for(let color of furniData.colors)
|
||||||
{
|
{
|
||||||
if(color !== 0xFFFFFF) // for some reason we hate the color white
|
if(color !== 0xFFFFFF) // skip the white colors
|
||||||
{
|
{
|
||||||
selectedColor = color;
|
selectedColor = color;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user