mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-22 22:30:52 +01:00
Fix badge only catalog items
This commit is contained in:
parent
72bc5562fd
commit
3298471651
@ -1,5 +1,6 @@
|
||||
import { FC } from 'react';
|
||||
import { Base, Column, Flex, Grid, Text } from '../../../../../common';
|
||||
import { ProductTypeEnum } from '../../../../../api';
|
||||
import { Column, Flex, Grid, Text } from '../../../../../common';
|
||||
import { useCatalog } from '../../../../../hooks';
|
||||
import { CatalogAddOnBadgeWidgetView } from '../widgets/CatalogAddOnBadgeWidgetView';
|
||||
import { CatalogItemGridWidgetView } from '../widgets/CatalogItemGridWidgetView';
|
||||
@ -28,11 +29,15 @@ export const CatalogLayoutDefaultView: FC<CatalogLayoutProps> = props =>
|
||||
</> }
|
||||
{ currentOffer &&
|
||||
<>
|
||||
<Base position="relative" overflow="hidden">
|
||||
<Flex center overflow="hidden" style={ { height: 140 } }>
|
||||
{ (currentOffer.product.productType !== ProductTypeEnum.BADGE) &&
|
||||
<>
|
||||
<CatalogViewProductWidgetView />
|
||||
<CatalogLimitedItemWidgetView fullWidth position="absolute" className="top-1" />
|
||||
<CatalogAddOnBadgeWidgetView position="absolute" className="bg-muted rounded bottom-1 end-1" />
|
||||
</Base>
|
||||
<CatalogAddOnBadgeWidgetView className="bg-muted rounded bottom-1 end-1" />
|
||||
</> }
|
||||
{ (currentOffer.product.productType === ProductTypeEnum.BADGE) && <CatalogAddOnBadgeWidgetView className="scale-2" /> }
|
||||
</Flex>
|
||||
<Column grow gap={ 1 }>
|
||||
<Text grow truncate>{ currentOffer.localizationName }</Text>
|
||||
<Flex justifyContent="between">
|
||||
|
@ -17,6 +17,8 @@ export const CatalogViewProductWidgetView: FC<{}> = props =>
|
||||
|
||||
if(!product) return;
|
||||
|
||||
roomPreviewer.reset(false);
|
||||
|
||||
switch(product.productType)
|
||||
{
|
||||
case ProductTypeEnum.FLOOR: {
|
||||
@ -49,15 +51,12 @@ export const CatalogViewProductWidgetView: FC<{}> = props =>
|
||||
switch(product.furnitureData.specialType)
|
||||
{
|
||||
case FurniCategory.FLOOR:
|
||||
roomPreviewer.reset(false);
|
||||
roomPreviewer.updateObjectRoom(product.extraParam);
|
||||
return;
|
||||
case FurniCategory.WALL_PAPER:
|
||||
roomPreviewer.reset(false);
|
||||
roomPreviewer.updateObjectRoom(null, product.extraParam);
|
||||
return;
|
||||
case FurniCategory.LANDSCAPE: {
|
||||
roomPreviewer.reset(false);
|
||||
roomPreviewer.updateObjectRoom(null, null, product.extraParam);
|
||||
|
||||
const furniData = GetSessionDataManager().getWallItemDataByName('ads_twi_windw');
|
||||
|
Loading…
Reference in New Issue
Block a user