diff --git a/src/views/shared/furni-image/FurniImageView.tsx b/src/common/layout/LayoutFurniImageView.tsx similarity index 87% rename from src/views/shared/furni-image/FurniImageView.tsx rename to src/common/layout/LayoutFurniImageView.tsx index bcb2172e..a9d81772 100644 --- a/src/views/shared/furni-image/FurniImageView.tsx +++ b/src/common/layout/LayoutFurniImageView.tsx @@ -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 = props => +export const LayoutFurniImageView: FC = props => { const { productType = 's', productClassId = -1, direction = 0, extraData = '', scale = 1 } = props; const [ imageElement, setImageElement ] = useState(null); diff --git a/src/common/layout/index.ts b/src/common/layout/index.ts index dd6afb36..6ba32465 100644 --- a/src/common/layout/index.ts +++ b/src/common/layout/index.ts @@ -1,5 +1,6 @@ export * from './LayoutBadgeImageView'; export * from './LayoutCurrencyIcon'; +export * from './LayoutFurniImageView'; export * from './LayoutGiftTagView'; export * from './LayoutGridItem'; export * from './LayoutImage'; diff --git a/src/components/catalog/views/gift/CatalogGiftView.tsx b/src/components/catalog/views/gift/CatalogGiftView.tsx index f2b0687f..a2904404 100644 --- a/src/components/catalog/views/gift/CatalogGiftView.tsx +++ b/src/components/catalog/views/gift/CatalogGiftView.tsx @@ -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 => { selectedColorId && - + }