mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-30 08:50:51 +01:00
Update FurniImageView
This commit is contained in:
parent
0af1450ea6
commit
2e296a765c
@ -1,10 +1,10 @@
|
||||
import { IGetImageListener, ImageResult, TextureUtils, Vector3d } from '@nitrots/nitro-renderer';
|
||||
import { FC, useCallback, useEffect, useState } from 'react';
|
||||
import { GetRoomEngine } from '../../../api';
|
||||
import { Base } from '../../../common/Base';
|
||||
import { ProductTypeEnum } from '../../../components/catalog/common/ProductTypeEnum';
|
||||
import { GetRoomEngine } from '../../api';
|
||||
import { ProductTypeEnum } from '../../components/catalog/common/ProductTypeEnum';
|
||||
import { Base } from '../Base';
|
||||
|
||||
interface FurniImageViewProps
|
||||
interface LayoutFurniImageViewProps
|
||||
{
|
||||
productType: string;
|
||||
productClassId: number;
|
||||
@ -13,7 +13,7 @@ interface FurniImageViewProps
|
||||
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 [ imageElement, setImageElement ] = useState<HTMLImageElement>(null);
|
@ -1,5 +1,6 @@
|
||||
export * from './LayoutBadgeImageView';
|
||||
export * from './LayoutCurrencyIcon';
|
||||
export * from './LayoutFurniImageView';
|
||||
export * from './LayoutGiftTagView';
|
||||
export * from './LayoutGridItem';
|
||||
export * from './LayoutImage';
|
||||
|
@ -3,10 +3,9 @@ import { PurchaseFromCatalogAsGiftComposer } from '@nitrots/nitro-renderer';
|
||||
import classNames from 'classnames';
|
||||
import { FC, useCallback, useEffect, useMemo, useState } from 'react';
|
||||
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 { BatchUpdates, UseUiEvent } from '../../../../hooks';
|
||||
import { FurniImageView } from '../../../../views/shared/furni-image/FurniImageView';
|
||||
import { useCatalogContext } from '../../CatalogContext';
|
||||
import { ProductTypeEnum } from '../../common/ProductTypeEnum';
|
||||
|
||||
@ -183,7 +182,7 @@ export const CatalogGiftView: FC<{}> = props =>
|
||||
<Flex alignItems="center" gap={ 2 }>
|
||||
{ selectedColorId &&
|
||||
<Base className="gift-preview">
|
||||
<FurniImageView productType={ ProductTypeEnum.FLOOR } productClassId={ selectedColorId } extraData={ boxExtraData } />
|
||||
<LayoutFurniImageView productType={ ProductTypeEnum.FLOOR } productClassId={ selectedColorId } extraData={ boxExtraData } />
|
||||
</Base> }
|
||||
<Column gap={ 1 }>
|
||||
<Flex gap={ 2 }>
|
||||
|
Loading…
Reference in New Issue
Block a user