Update FurniImageView

This commit is contained in:
Bill 2022-03-03 23:53:44 -05:00
parent 0af1450ea6
commit 2e296a765c
3 changed files with 8 additions and 8 deletions

View File

@ -1,10 +1,10 @@
import { IGetImageListener, ImageResult, TextureUtils, Vector3d } from '@nitrots/nitro-renderer'; import { IGetImageListener, ImageResult, TextureUtils, Vector3d } from '@nitrots/nitro-renderer';
import { FC, useCallback, useEffect, useState } from 'react'; import { FC, useCallback, useEffect, useState } from 'react';
import { GetRoomEngine } from '../../../api'; import { GetRoomEngine } from '../../api';
import { Base } from '../../../common/Base'; import { ProductTypeEnum } from '../../components/catalog/common/ProductTypeEnum';
import { ProductTypeEnum } from '../../../components/catalog/common/ProductTypeEnum'; import { Base } from '../Base';
interface FurniImageViewProps interface LayoutFurniImageViewProps
{ {
productType: string; productType: string;
productClassId: number; productClassId: number;
@ -13,7 +13,7 @@ interface FurniImageViewProps
scale?: number; scale?: number;
} }
export const FurniImageView: FC<FurniImageViewProps> = props => export const LayoutFurniImageView: FC<LayoutFurniImageViewProps> = props =>
{ {
const { productType = 's', productClassId = -1, direction = 0, extraData = '', scale = 1 } = props; const { productType = 's', productClassId = -1, direction = 0, extraData = '', scale = 1 } = props;
const [ imageElement, setImageElement ] = useState<HTMLImageElement>(null); const [ imageElement, setImageElement ] = useState<HTMLImageElement>(null);

View File

@ -1,5 +1,6 @@
export * from './LayoutBadgeImageView'; export * from './LayoutBadgeImageView';
export * from './LayoutCurrencyIcon'; export * from './LayoutCurrencyIcon';
export * from './LayoutFurniImageView';
export * from './LayoutGiftTagView'; export * from './LayoutGiftTagView';
export * from './LayoutGridItem'; export * from './LayoutGridItem';
export * from './LayoutImage'; export * from './LayoutImage';

View File

@ -3,10 +3,9 @@ import { PurchaseFromCatalogAsGiftComposer } from '@nitrots/nitro-renderer';
import classNames from 'classnames'; import classNames from 'classnames';
import { FC, useCallback, useEffect, useMemo, useState } from 'react'; import { FC, useCallback, useEffect, useMemo, useState } from 'react';
import { GetSessionDataManager, LocalizeText, SendMessageComposer } from '../../../../api'; import { GetSessionDataManager, LocalizeText, SendMessageComposer } from '../../../../api';
import { Base, Button, ButtonGroup, Column, Flex, FormGroup, LayoutCurrencyIcon, LayoutGiftTagView, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common'; import { Base, Button, ButtonGroup, Column, Flex, FormGroup, LayoutCurrencyIcon, LayoutFurniImageView, LayoutGiftTagView, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common';
import { CatalogEvent, CatalogInitGiftEvent, CatalogPurchasedEvent } from '../../../../events'; import { CatalogEvent, CatalogInitGiftEvent, CatalogPurchasedEvent } from '../../../../events';
import { BatchUpdates, UseUiEvent } from '../../../../hooks'; import { BatchUpdates, UseUiEvent } from '../../../../hooks';
import { FurniImageView } from '../../../../views/shared/furni-image/FurniImageView';
import { useCatalogContext } from '../../CatalogContext'; import { useCatalogContext } from '../../CatalogContext';
import { ProductTypeEnum } from '../../common/ProductTypeEnum'; import { ProductTypeEnum } from '../../common/ProductTypeEnum';
@ -183,7 +182,7 @@ export const CatalogGiftView: FC<{}> = props =>
<Flex alignItems="center" gap={ 2 }> <Flex alignItems="center" gap={ 2 }>
{ selectedColorId && { selectedColorId &&
<Base className="gift-preview"> <Base className="gift-preview">
<FurniImageView productType={ ProductTypeEnum.FLOOR } productClassId={ selectedColorId } extraData={ boxExtraData } /> <LayoutFurniImageView productType={ ProductTypeEnum.FLOOR } productClassId={ selectedColorId } extraData={ boxExtraData } />
</Base> } </Base> }
<Column gap={ 1 }> <Column gap={ 1 }>
<Flex gap={ 2 }> <Flex gap={ 2 }>