From 35efd87188e1865dff7ff7bc59678901a0a65b78 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 6 Jan 2022 01:32:44 -0500 Subject: [PATCH] More catalog updates --- src/components/catalog/CatalogView.tsx | 2 +- .../page-details/CatalogPageDetailsView.tsx | 7 +- .../CatalogPageDetailsView.types.ts | 6 - .../views/page/layout/CatalogLayout.scss | 14 +- .../views/page/layout/GetCatalogLayout.tsx | 4 +- .../CatalogLayoutMarketplaceItemView.tsx | 102 +++++++++++++ .../CatalogLayoutMarketplaceOwnItemsView.tsx | 115 +++++++++++++++ ...atalogLayoutMarketplacePublicItemsView.tsx | 76 +++++----- ...CatalogLayoutMarketplaceSearchFormView.tsx | 76 ++++++++++ .../marketplace/MarketplacePostOfferView.tsx | 134 ++++++++++++++++++ .../marketplace-item/MarketplaceItemView.scss | 4 - .../marketplace-item/MarketplaceItemView.tsx | 101 ------------- .../CatalogLayoutMarketplaceOwnItemsView.tsx | 120 ---------------- .../post-offer/MarketplacePostOfferView.scss | 12 -- .../post-offer/MarketplacePostOfferView.tsx | 117 --------------- .../public-items/SearchFormView.tsx | 70 --------- .../pets/CatalogLayoutPetPurchaseView.tsx | 4 +- .../purchase/CatalogPurchaseButtonView.tsx | 2 +- .../CatalogPurchaseGiftButtonView.tsx | 2 +- .../page/purchase/CatalogPurchaseView.tsx | 4 +- .../select-group/CatalogSelectGroupView.tsx | 40 +++--- .../CatalogSelectGroupView.types.ts | 7 - 22 files changed, 518 insertions(+), 501 deletions(-) delete mode 100644 src/components/catalog/views/page-details/CatalogPageDetailsView.types.ts create mode 100644 src/components/catalog/views/page/layout/marketplace/CatalogLayoutMarketplaceItemView.tsx create mode 100644 src/components/catalog/views/page/layout/marketplace/CatalogLayoutMarketplaceOwnItemsView.tsx rename src/components/catalog/views/page/layout/marketplace/{public-items => }/CatalogLayoutMarketplacePublicItemsView.tsx (66%) create mode 100644 src/components/catalog/views/page/layout/marketplace/CatalogLayoutMarketplaceSearchFormView.tsx create mode 100644 src/components/catalog/views/page/layout/marketplace/MarketplacePostOfferView.tsx delete mode 100644 src/components/catalog/views/page/layout/marketplace/marketplace-item/MarketplaceItemView.scss delete mode 100644 src/components/catalog/views/page/layout/marketplace/marketplace-item/MarketplaceItemView.tsx delete mode 100644 src/components/catalog/views/page/layout/marketplace/own-items/CatalogLayoutMarketplaceOwnItemsView.tsx delete mode 100644 src/components/catalog/views/page/layout/marketplace/post-offer/MarketplacePostOfferView.scss delete mode 100644 src/components/catalog/views/page/layout/marketplace/post-offer/MarketplacePostOfferView.tsx delete mode 100644 src/components/catalog/views/page/layout/marketplace/public-items/SearchFormView.tsx delete mode 100644 src/components/catalog/views/select-group/CatalogSelectGroupView.types.ts diff --git a/src/components/catalog/CatalogView.tsx b/src/components/catalog/CatalogView.tsx index 78e2d372..abde5ff8 100644 --- a/src/components/catalog/CatalogView.tsx +++ b/src/components/catalog/CatalogView.tsx @@ -17,7 +17,7 @@ import { CatalogReducer, initialCatalog } from './reducers/CatalogReducer'; import { CatalogGiftView } from './views/gift/CatalogGiftView'; import { ACTIVE_PAGES, CatalogNavigationView } from './views/navigation/CatalogNavigationView'; import { CatalogPageView } from './views/page/CatalogPageView'; -import { MarketplacePostOfferView } from './views/page/layout/marketplace/post-offer/MarketplacePostOfferView'; +import { MarketplacePostOfferView } from './views/page/layout/marketplace/MarketplacePostOfferView'; export const CatalogView: FC<{}> = props => { diff --git a/src/components/catalog/views/page-details/CatalogPageDetailsView.tsx b/src/components/catalog/views/page-details/CatalogPageDetailsView.tsx index d5a8ad6c..f9270e42 100644 --- a/src/components/catalog/views/page-details/CatalogPageDetailsView.tsx +++ b/src/components/catalog/views/page-details/CatalogPageDetailsView.tsx @@ -1,7 +1,12 @@ +import { CatalogPageMessageParser } from '@nitrots/nitro-renderer'; import { FC } from 'react'; import { NitroLayoutFlexColumn } from '../../../../layout'; import { GetCatalogPageImage, GetCatalogPageText } from '../../common/CatalogUtilities'; -import { CatalogPageDetailsViewProps } from './CatalogPageDetailsView.types'; + +export interface CatalogPageDetailsViewProps +{ + pageParser: CatalogPageMessageParser; +} export const CatalogPageDetailsView: FC = props => { diff --git a/src/components/catalog/views/page-details/CatalogPageDetailsView.types.ts b/src/components/catalog/views/page-details/CatalogPageDetailsView.types.ts deleted file mode 100644 index a02c3b6c..00000000 --- a/src/components/catalog/views/page-details/CatalogPageDetailsView.types.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { CatalogPageMessageParser } from '@nitrots/nitro-renderer'; - -export interface CatalogPageDetailsViewProps -{ - pageParser: CatalogPageMessageParser; -} diff --git a/src/components/catalog/views/page/layout/CatalogLayout.scss b/src/components/catalog/views/page/layout/CatalogLayout.scss index 2d8db51f..e72a9379 100644 --- a/src/components/catalog/views/page/layout/CatalogLayout.scss +++ b/src/components/catalog/views/page/layout/CatalogLayout.scss @@ -28,5 +28,15 @@ } } -@import './marketplace/marketplace-item/MarketplaceItemView'; -@import './marketplace/post-offer/MarketplacePostOfferView'; +.nitro-catalog-layout-marketplace-grid { + + .layout-grid-item { + height: 75px !important; + max-height: 75px !important; + } +} + +.nitro-catalog-layout-marketplace-post-offer { + width: $marketplace-post-offer-width; + height: $marketplace-post-offer-height; +} diff --git a/src/components/catalog/views/page/layout/GetCatalogLayout.tsx b/src/components/catalog/views/page/layout/GetCatalogLayout.tsx index bbef91a1..c5e7b58c 100644 --- a/src/components/catalog/views/page/layout/GetCatalogLayout.tsx +++ b/src/components/catalog/views/page/layout/GetCatalogLayout.tsx @@ -6,8 +6,8 @@ import { CatalogLayouGuildCustomFurniView } from './guild-custom-furni/CatalogLa import { CatalogLayouGuildForumView } from './guild-forum/CatalogLayoutGuildForumView'; import { CatalogLayouGuildFrontpageView } from './guild-frontpage/CatalogLayoutGuildFrontpageView'; import { CatalogLayoutInfoLoyaltyView } from './info-loyalty/CatalogLayoutInfoLoyaltyView'; -import { CatalogLayoutMarketplaceOwnItemsView } from './marketplace/own-items/CatalogLayoutMarketplaceOwnItemsView'; -import { CatalogLayoutMarketplacePublicItemsView } from './marketplace/public-items/CatalogLayoutMarketplacePublicItemsView'; +import { CatalogLayoutMarketplaceOwnItemsView } from './marketplace/CatalogLayoutMarketplaceOwnItemsView'; +import { CatalogLayoutMarketplacePublicItemsView } from './marketplace/CatalogLayoutMarketplacePublicItemsView'; import { CatalogLayoutPetView } from './pets/CatalogLayoutPetView'; import { CatalogLayoutPets2View } from './pets2/CatalogLayoutPets2View'; import { CatalogLayoutPets3View } from './pets3/CatalogLayoutPets3View'; diff --git a/src/components/catalog/views/page/layout/marketplace/CatalogLayoutMarketplaceItemView.tsx b/src/components/catalog/views/page/layout/marketplace/CatalogLayoutMarketplaceItemView.tsx new file mode 100644 index 00000000..828461eb --- /dev/null +++ b/src/components/catalog/views/page/layout/marketplace/CatalogLayoutMarketplaceItemView.tsx @@ -0,0 +1,102 @@ +import { FC, useCallback, useMemo } from 'react'; +import { GetRoomEngine, LocalizeText } from '../../../../../../api'; +import { Button } from '../../../../../../common/Button'; +import { Column } from '../../../../../../common/Column'; +import { LayoutGridItem } from '../../../../../../common/layout/LayoutGridItem'; +import { LayoutImage } from '../../../../../../common/layout/LayoutImage'; +import { Text } from '../../../../../../common/Text'; +import { MarketplaceOfferData } from './common/MarketplaceOfferData'; +import { MarketPlaceOfferState } from './common/MarketplaceOfferState'; + +export interface MarketplaceItemViewProps +{ + offerData: MarketplaceOfferData; + type?: number; + onClick(offerData: MarketplaceOfferData): void; +} + +export const OWN_OFFER = 1; +export const PUBLIC_OFFER = 2; + +export const CatalogLayoutMarketplaceItemView: FC = props => +{ + const { offerData = null, type = PUBLIC_OFFER, onClick = null } = props; + + const getImageUrlForOffer = useCallback( () => + { + if(!offerData) return ''; + + switch(offerData.furniType) + { + case MarketplaceOfferData.TYPE_FLOOR: + return GetRoomEngine().getFurnitureFloorIconUrl(offerData.furniId); + case MarketplaceOfferData.TYPE_WALL: + return GetRoomEngine().getFurnitureWallIconUrl(offerData.furniId, offerData.extraData); + } + + return ''; + }, [offerData]); + + const getMarketplaceOfferTitle = useMemo(() => + { + if(!offerData) return ''; + + // desc + return LocalizeText(((offerData.furniType === 2) ? 'wallItem' : 'roomItem') + `.name.${ offerData.furniId }`); + }, [ offerData ]); + + const offerTime = useCallback( () => + { + if(!offerData) return ''; + + if(offerData.status === MarketPlaceOfferState.SOLD) return LocalizeText('catalog.marketplace.offer.sold'); + + if(offerData.timeLeftMinutes <= 0) return LocalizeText('catalog.marketplace.offer.expired'); + + const time = Math.max(1, offerData.timeLeftMinutes); + const hours = Math.floor(time / 60); + const minutes = time - (hours * 60); + + let text = minutes + ' ' + LocalizeText('catalog.marketplace.offer.minutes'); + if(hours > 0) + { + text = hours + ' ' + LocalizeText('catalog.marketplace.offer.hours') + ' ' + text; + } + + return LocalizeText('catalog.marketplace.offer.time_left', ['time'], [text] ); + }, [offerData]); + + return ( + + + + { getMarketplaceOfferTitle } + { (type === OWN_OFFER) && + <> + { LocalizeText('catalog.marketplace.offer.price_own_item', [ 'price' ], [ offerData.price.toString() ]) } + { offerTime() } + } + { (type === PUBLIC_OFFER) && + <> + { LocalizeText('catalog.marketplace.offer.price_public_item', ['price', 'average'], [offerData.price.toString(), offerData.averagePrice.toString() ]) } + { LocalizeText('catalog.marketplace.offer_count', ['count'], [offerData.offerCount.toString()]) } + } + + + { ((type === OWN_OFFER) && (offerData.status !== MarketPlaceOfferState.SOLD)) && + } + { type === PUBLIC_OFFER && + <> + + + } + + + ); +} diff --git a/src/components/catalog/views/page/layout/marketplace/CatalogLayoutMarketplaceOwnItemsView.tsx b/src/components/catalog/views/page/layout/marketplace/CatalogLayoutMarketplaceOwnItemsView.tsx new file mode 100644 index 00000000..94f94ef1 --- /dev/null +++ b/src/components/catalog/views/page/layout/marketplace/CatalogLayoutMarketplaceOwnItemsView.tsx @@ -0,0 +1,115 @@ +import { CancelMarketplaceOfferMessageComposer, GetMarketplaceOwnOffersMessageComposer, MarketplaceCancelOfferResultEvent, MarketplaceOwnOffersEvent, RedeemMarketplaceOfferCreditsMessageComposer } from '@nitrots/nitro-renderer'; +import { FC, useCallback, useMemo, useState } from 'react'; +import { LocalizeText } from '../../../../../../api'; +import { Button } from '../../../../../../common/Button'; +import { Column } from '../../../../../../common/Column'; +import { Grid } from '../../../../../../common/Grid'; +import { Text } from '../../../../../../common/Text'; +import { BatchUpdates, CreateMessageHook, SendMessageHook, UseMountEffect } from '../../../../../../hooks'; +import { NotificationAlertType } from '../../../../../../views/notification-center/common/NotificationAlertType'; +import { NotificationUtilities } from '../../../../../../views/notification-center/common/NotificationUtilities'; +import { CatalogLayoutProps } from '../CatalogLayout.types'; +import { CatalogLayoutMarketplaceItemView, OWN_OFFER } from './CatalogLayoutMarketplaceItemView'; +import { MarketplaceOfferData } from './common/MarketplaceOfferData'; +import { MarketPlaceOfferState } from './common/MarketplaceOfferState'; + +export const CatalogLayoutMarketplaceOwnItemsView: FC = props => +{ + const [ creditsWaiting, setCreditsWaiting ] = useState(0); + const [ offers, setOffers ] = useState([]); + + const onMarketPlaceOwnOffersEvent = useCallback((event: MarketplaceOwnOffersEvent) => + { + const parser = event.getParser(); + + if(!parser) return; + + const offers = parser.offers.map(offer => + { + const newOffer = new MarketplaceOfferData(offer.offerId, offer.furniId, offer.furniType, offer.extraData, offer.stuffData, offer.price, offer.status, offer.averagePrice, offer.offerCount); + + newOffer.timeLeftMinutes = offer.timeLeftMinutes; + + return newOffer; + }); + + BatchUpdates(() => + { + setCreditsWaiting(parser.creditsWaiting); + setOffers(offers); + }); + }, []); + + CreateMessageHook(MarketplaceOwnOffersEvent, onMarketPlaceOwnOffersEvent); + + const onMarketplaceCancelOfferResultEvent = useCallback((event:MarketplaceCancelOfferResultEvent) => + { + const parser = event.getParser(); + + if(!parser) return; + + if(!parser.success) + { + NotificationUtilities.simpleAlert(LocalizeText('catalog.marketplace.cancel_failed'), NotificationAlertType.DEFAULT, null, null, LocalizeText('catalog.marketplace.operation_failed.topic')); + + return; + } + + setOffers(prevValue => prevValue.filter(value => (value.offerId !== parser.offerId))); + }, []); + + CreateMessageHook(MarketplaceCancelOfferResultEvent, onMarketplaceCancelOfferResultEvent); + + const soldOffers = useMemo(() => + { + return offers.filter(value => (value.status === MarketPlaceOfferState.SOLD)); + }, [ offers ]); + + const redeemSoldOffers = useCallback(() => + { + setOffers(prevValue => + { + const idsToDelete = soldOffers.map(value => value.offerId); + + return prevValue.filter(value => (idsToDelete.indexOf(value.offerId) === -1)); + }) + + SendMessageHook(new RedeemMarketplaceOfferCreditsMessageComposer()); + }, [ soldOffers ]); + + const takeItemBack = (offerData: MarketplaceOfferData) => + { + SendMessageHook(new CancelMarketplaceOfferMessageComposer(offerData.offerId)); + }; + + UseMountEffect(() => + { + SendMessageHook(new GetMarketplaceOwnOffersMessageComposer()); + }); + + return ( + + { (creditsWaiting <= 0) && + + { LocalizeText('catalog.marketplace.redeem.no_sold_items') } + } + { (creditsWaiting > 0) && + + + { LocalizeText('catalog.marketplace.redeem.get_credits', ['count', 'credits'], [ soldOffers.length.toString(), creditsWaiting.toString() ]) } + + + } + + + { LocalizeText('catalog.marketplace.items_found', [ 'count' ], [ offers.length.toString() ]) } + + + { (offers.length > 0) && offers.map(offer => ) } + + + + ); +} diff --git a/src/components/catalog/views/page/layout/marketplace/public-items/CatalogLayoutMarketplacePublicItemsView.tsx b/src/components/catalog/views/page/layout/marketplace/CatalogLayoutMarketplacePublicItemsView.tsx similarity index 66% rename from src/components/catalog/views/page/layout/marketplace/public-items/CatalogLayoutMarketplacePublicItemsView.tsx rename to src/components/catalog/views/page/layout/marketplace/CatalogLayoutMarketplacePublicItemsView.tsx index 752d52b7..0493c33a 100644 --- a/src/components/catalog/views/page/layout/marketplace/public-items/CatalogLayoutMarketplacePublicItemsView.tsx +++ b/src/components/catalog/views/page/layout/marketplace/CatalogLayoutMarketplacePublicItemsView.tsx @@ -1,17 +1,21 @@ import { BuyMarketplaceOfferMessageComposer, GetMarketplaceOffersMessageComposer, MarketplaceBuyOfferResultEvent, MarketPlaceOffersEvent } from '@nitrots/nitro-renderer'; import { FC, useCallback, useMemo, useState } from 'react'; -import { LocalizeText } from '../../../../../../../api'; -import { BatchUpdates, CreateMessageHook, SendMessageHook } from '../../../../../../../hooks'; -import { NitroCardGridView } from '../../../../../../../layout'; -import { NotificationAlertType } from '../../../../../../../views/notification-center/common/NotificationAlertType'; -import { NotificationUtilities } from '../../../../../../../views/notification-center/common/NotificationUtilities'; -import { GetCurrencyAmount } from '../../../../../../../views/purse/common/CurrencyHelper'; -import { CatalogLayoutProps } from '../../CatalogLayout.types'; -import { IMarketplaceSearchOptions } from '../common/IMarketplaceSearchOptions'; -import { MarketplaceOfferData } from '../common/MarketplaceOfferData'; -import { MarketplaceSearchType } from '../common/MarketplaceSearchType'; -import { MarketplaceItemView, PUBLIC_OFFER } from '../marketplace-item/MarketplaceItemView'; -import { SearchFormView } from './SearchFormView'; +import { LocalizeText } from '../../../../../../api'; +import { Button } from '../../../../../../common/Button'; +import { ButtonGroup } from '../../../../../../common/ButtonGroup'; +import { Column } from '../../../../../../common/Column'; +import { Grid } from '../../../../../../common/Grid'; +import { Text } from '../../../../../../common/Text'; +import { BatchUpdates, CreateMessageHook, SendMessageHook } from '../../../../../../hooks'; +import { NotificationAlertType } from '../../../../../../views/notification-center/common/NotificationAlertType'; +import { NotificationUtilities } from '../../../../../../views/notification-center/common/NotificationUtilities'; +import { GetCurrencyAmount } from '../../../../../../views/purse/common/CurrencyHelper'; +import { CatalogLayoutProps } from '../CatalogLayout.types'; +import { CatalogLayoutMarketplaceItemView, PUBLIC_OFFER } from './CatalogLayoutMarketplaceItemView'; +import { SearchFormView } from './CatalogLayoutMarketplaceSearchFormView'; +import { IMarketplaceSearchOptions } from './common/IMarketplaceSearchOptions'; +import { MarketplaceOfferData } from './common/MarketplaceOfferData'; +import { MarketplaceSearchType } from './common/MarketplaceSearchType'; const SORT_TYPES_VALUE = [1, 2]; const SORT_TYPES_ACTIVITY = [3, 4, 5, 6]; @@ -141,26 +145,30 @@ export const CatalogLayoutMarketplacePublicItemsView: FC -
- - - -
- - - -
{LocalizeText('catalog.marketplace.items_found', ['count'], [offers.size.toString()])}
- - { - Array.from(offers.values()).map( (entry, index) => ) - } - - ); + return ( + <> + + + + + + + + + { LocalizeText('catalog.marketplace.items_found', [ 'count' ], [ offers.size.toString() ]) } + + + { + Array.from(offers.values()).map( (entry, index) => ) + } + + + + ); } diff --git a/src/components/catalog/views/page/layout/marketplace/CatalogLayoutMarketplaceSearchFormView.tsx b/src/components/catalog/views/page/layout/marketplace/CatalogLayoutMarketplaceSearchFormView.tsx new file mode 100644 index 00000000..8397059b --- /dev/null +++ b/src/components/catalog/views/page/layout/marketplace/CatalogLayoutMarketplaceSearchFormView.tsx @@ -0,0 +1,76 @@ +import { FC, useCallback, useEffect, useState } from 'react'; +import { LocalizeText } from '../../../../../../api'; +import { Button } from '../../../../../../common/Button'; +import { Column } from '../../../../../../common/Column'; +import { Flex } from '../../../../../../common/Flex'; +import { Text } from '../../../../../../common/Text'; +import { IMarketplaceSearchOptions } from './common/IMarketplaceSearchOptions'; +import { MarketplaceSearchType } from './common/MarketplaceSearchType'; + +export interface SearchFormViewProps +{ + searchType: number; + sortTypes: number[]; + onSearch(options: IMarketplaceSearchOptions): void; +} + +export const SearchFormView: FC = props => +{ + const { searchType = null, sortTypes = null, onSearch = null } = props; + const [ sortType, setSortType ] = useState(sortTypes ? sortTypes[0] : 3); // first item of SORT_TYPES_ACTIVITY + const [ searchQuery, setSearchQuery ] = useState(''); + const [ min, setMin ] = useState(0); + const [ max, setMax ] = useState(0); + + const onSortTypeChange = useCallback((sortType: number) => + { + setSortType(sortType); + + if((searchType === MarketplaceSearchType.BY_ACTIVITY) || (searchType === MarketplaceSearchType.BY_VALUE)) onSearch({ minPrice: -1, maxPrice: -1, query: '', type: sortType }); + }, [ onSearch, searchType ]); + + const onClickSearch = useCallback(() => + { + const minPrice = ((min > 0) ? min : -1); + const maxPrice = ((max > 0) ? max : -1); + + onSearch({ minPrice: minPrice, maxPrice: maxPrice, type: sortType, query: searchQuery }) + }, [ max, min, onSearch, searchQuery, sortType ]); + + useEffect( () => + { + if(!sortTypes || !sortTypes.length) return; + + const sortType = sortTypes[0]; + + setSortType(sortType); + + if(searchType === MarketplaceSearchType.BY_ACTIVITY || MarketplaceSearchType.BY_VALUE === searchType) onSearch({ minPrice: -1, maxPrice: -1, query: '', type: sortType }); + }, [onSearch, searchType, sortTypes]); + + return ( + + + { LocalizeText('catalog.marketplace.sort_order') } + + + { searchType === MarketplaceSearchType.ADVANCED && + <> + + { LocalizeText('catalog.marketplace.search_name') } + setSearchQuery(event.target.value) }/> + + + { LocalizeText('catalog.marketplace.search_price') } + + setMin(event.target.valueAsNumber) } /> + setMax(event.target.valueAsNumber) } /> + + + + } + + ); +} diff --git a/src/components/catalog/views/page/layout/marketplace/MarketplacePostOfferView.tsx b/src/components/catalog/views/page/layout/marketplace/MarketplacePostOfferView.tsx new file mode 100644 index 00000000..505654e4 --- /dev/null +++ b/src/components/catalog/views/page/layout/marketplace/MarketplacePostOfferView.tsx @@ -0,0 +1,134 @@ +import { ImageResult, MakeOfferMessageComposer, Vector3d } from '@nitrots/nitro-renderer'; +import { FC, useCallback, useState } from 'react'; +import { GetRoomEngine, LocalizeText } from '../../../../../../api'; +import { Base } from '../../../../../../common/Base'; +import { Button } from '../../../../../../common/Button'; +import { Column } from '../../../../../../common/Column'; +import { Grid } from '../../../../../../common/Grid'; +import { LayoutImage } from '../../../../../../common/layout/LayoutImage'; +import { Text } from '../../../../../../common/Text'; +import { CatalogPostMarketplaceOfferEvent } from '../../../../../../events/catalog/CatalogPostMarketplaceOfferEvent'; +import { BatchUpdates, SendMessageHook, useUiEvent } from '../../../../../../hooks'; +import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../../../layout'; +import { NotificationUtilities } from '../../../../../../views/notification-center/common/NotificationUtilities'; +import { FurnitureItem } from '../../../../../inventory/common/FurnitureItem'; +import { useCatalogContext } from '../../../../context/CatalogContext'; + +export const MarketplacePostOfferView : FC<{}> = props => +{ + const [ item, setItem ] = useState(null); + const [ askingPrice, setAskingPrice ] = useState(0); + const { catalogState = null, dispatchCatalogState = null } = useCatalogContext(); + + const close = useCallback(() => + { + BatchUpdates(() => + { + setItem(null); + setAskingPrice(0); + }); + }, []); + + const onCatalogPostMarketplaceOfferEvent = useCallback( (event: CatalogPostMarketplaceOfferEvent) => + { + setItem(event.item); + }, []); + + useUiEvent(CatalogPostMarketplaceOfferEvent.POST_MARKETPLACE, onCatalogPostMarketplaceOfferEvent); + + const getItemImage = useCallback( () => + { + if(!item) return ''; + + let object: ImageResult; + + if(!item.isWallItem) + { + object = GetRoomEngine().getFurnitureFloorImage(item.type, new Vector3d(90,0,0), 64, this, 4293848814, item.extra.toString()); + } + else + { + object = GetRoomEngine().getFurnitureWallImage(item.type, new Vector3d(90,0,0), 64, this, 4293848814, item.extra.toString()); + } + + if(object) + { + const image = object.getImage(); + + if(image) return image.src; + } + return ''; + }, [item]); + + const getFurniTitle = useCallback( () => + { + if(!item) return ''; + + const localizationKey = item.isWallItem ? 'wallItem.name.' + item.type : 'roomItem.name.' + item.type; + + return LocalizeText(localizationKey); + }, [item]); + + const getFurniDescription = useCallback( () => + { + if(!item) return ''; + + const localizationKey = item.isWallItem ? 'wallItem.desc.' + item.type : 'roomItem.desc.' + item.type; + + return LocalizeText(localizationKey); + }, [item]); + + const postItem = useCallback( () => + { + if(isNaN(askingPrice) || askingPrice <= 0 || !item) return; + + NotificationUtilities.confirm(LocalizeText('inventory.marketplace.confirm_offer.info', ['furniname', 'price'], [getFurniTitle(), askingPrice.toString()]), () => + { + SendMessageHook(new MakeOfferMessageComposer(askingPrice, item.isWallItem ? 2 : 1, item.id)); + setItem(null); + }, + () => { setItem(null)}, null, null, LocalizeText('inventory.marketplace.confirm_offer.title')); + }, [askingPrice, getFurniTitle, item]); + + return ( item && + + + + + + + + + + { getFurniTitle() } + { getFurniDescription() } + + + + { LocalizeText('inventory.marketplace.make_offer.expiration_info', ['time'], [catalogState.marketplaceConfiguration.offerTime.toString()]) } + +
+ setAskingPrice(event.target.valueAsNumber) } placeholder={ LocalizeText('inventory.marketplace.make_offer.price_request') } /> + { ((askingPrice < catalogState.marketplaceConfiguration.minimumPrice) || isNaN(askingPrice)) && + + { LocalizeText('inventory.marketplace.make_offer.min_price', [ 'minprice' ], [ catalogState.marketplaceConfiguration.minimumPrice.toString() ]) } + } + { ((askingPrice > catalogState.marketplaceConfiguration.maximumPrice) && !isNaN(askingPrice)) && + + { LocalizeText('inventory.marketplace.make_offer.max_price', [ 'maxprice' ], [ catalogState.marketplaceConfiguration.maximumPrice.toString() ]) } + } + { (!((askingPrice < catalogState.marketplaceConfiguration.minimumPrice) || (askingPrice > catalogState.marketplaceConfiguration.maximumPrice) || isNaN(askingPrice))) && + + { LocalizeText('inventory.marketplace.make_offer.final_price', [ 'commission', 'finalprice' ], [ catalogState.marketplaceConfiguration.commission.toString(), (askingPrice + catalogState.marketplaceConfiguration.commission).toString() ]) } + } +
+ +
+
+
+
+
+ ) +} diff --git a/src/components/catalog/views/page/layout/marketplace/marketplace-item/MarketplaceItemView.scss b/src/components/catalog/views/page/layout/marketplace/marketplace-item/MarketplaceItemView.scss deleted file mode 100644 index be2f5222..00000000 --- a/src/components/catalog/views/page/layout/marketplace/marketplace-item/MarketplaceItemView.scss +++ /dev/null @@ -1,4 +0,0 @@ -.marketplace-item { - max-height: 70px; - height: 70px; -} diff --git a/src/components/catalog/views/page/layout/marketplace/marketplace-item/MarketplaceItemView.tsx b/src/components/catalog/views/page/layout/marketplace/marketplace-item/MarketplaceItemView.tsx deleted file mode 100644 index db086b2a..00000000 --- a/src/components/catalog/views/page/layout/marketplace/marketplace-item/MarketplaceItemView.tsx +++ /dev/null @@ -1,101 +0,0 @@ -import { FC, useCallback } from 'react'; -import { GetRoomEngine, LocalizeText } from '../../../../../../../api'; -import { NitroCardGridItemView } from '../../../../../../../layout'; -import { MarketplaceOfferData } from '../common/MarketplaceOfferData'; -import { MarketPlaceOfferState } from '../common/MarketplaceOfferState'; - -export const OWN_OFFER = 1; -export const PUBLIC_OFFER = 2; - -export interface MarketplaceItemViewProps -{ - offerData: MarketplaceOfferData; - type?: number; - onClick(offerData: MarketplaceOfferData): void; -} - -export const MarketplaceItemView: FC = props => -{ - const { offerData = null, type = PUBLIC_OFFER, onClick = null } = props; - - const getImageUrlForOffer = useCallback( () => - { - if(!offerData) return ''; - - switch(offerData.furniType) - { - case MarketplaceOfferData.TYPE_FLOOR: - return GetRoomEngine().getFurnitureFloorIconUrl(offerData.furniId); - case MarketplaceOfferData.TYPE_WALL: - return GetRoomEngine().getFurnitureWallIconUrl(offerData.furniId, offerData.extraData); - } - - return ''; - }, [offerData]); - - const getMarketplaceOfferTitle = useCallback(() => - { - if(!offerData) return ''; - - const localizationKey = offerData.furniType === 2 ? 'wallItem.name.' + offerData.furniId: 'roomItem.name.' + offerData.furniId; - - return LocalizeText(localizationKey); - }, [offerData]); - - const getMarketplaceOfferDescription = useCallback( () => - { - if(!offerData) return ''; - - const localizationKey = offerData.furniType === 2 ? 'wallItem.desc.' + offerData.furniId : 'roomItem.desc.' + offerData.furniId; - - return LocalizeText(localizationKey); - }, [offerData]); - - const offerTime = useCallback( () => - { - if(!offerData) return ''; - - if(offerData.status === MarketPlaceOfferState.SOLD) return LocalizeText('catalog.marketplace.offer.sold'); - - if(offerData.timeLeftMinutes <= 0) return LocalizeText('catalog.marketplace.offer.expired'); - - const time = Math.max(1, offerData.timeLeftMinutes); - const hours = Math.floor(time / 60); - const minutes = time - (hours * 60); - - let text = minutes + ' ' + LocalizeText('catalog.marketplace.offer.minutes'); - if(hours > 0) - { - text = hours + ' ' + LocalizeText('catalog.marketplace.offer.hours') + ' ' + text; - } - - return LocalizeText('catalog.marketplace.offer.time_left', ['time'], [text] ); - }, [offerData]); - - return ( - - -
-
{getMarketplaceOfferTitle()}
-
{getMarketplaceOfferDescription()}
- - { type === OWN_OFFER && <> -
{ LocalizeText('catalog.marketplace.offer.price_own_item', ['price'], [offerData.price.toString()])}
-
{ offerTime() }
- - } - { type === PUBLIC_OFFER && <> -
{ LocalizeText('catalog.marketplace.offer.price_public_item', ['price', 'average'], [offerData.price.toString(), offerData.averagePrice.toString() ]) }
-
{ LocalizeText('catalog.marketplace.offer_count', ['count'], [offerData.offerCount.toString()]) }
- - } -
-
- { (type === OWN_OFFER && offerData.status !== MarketPlaceOfferState.SOLD) && } - { type === PUBLIC_OFFER && <> - - - } -
-
) -} diff --git a/src/components/catalog/views/page/layout/marketplace/own-items/CatalogLayoutMarketplaceOwnItemsView.tsx b/src/components/catalog/views/page/layout/marketplace/own-items/CatalogLayoutMarketplaceOwnItemsView.tsx deleted file mode 100644 index 5a68a22a..00000000 --- a/src/components/catalog/views/page/layout/marketplace/own-items/CatalogLayoutMarketplaceOwnItemsView.tsx +++ /dev/null @@ -1,120 +0,0 @@ -import { CancelMarketplaceOfferMessageComposer, GetMarketplaceOwnOffersMessageComposer, MarketplaceCancelOfferResultEvent, MarketplaceOwnOffersEvent, RedeemMarketplaceOfferCreditsMessageComposer } from '@nitrots/nitro-renderer'; -import { FC, useCallback, useState } from 'react'; -import { LocalizeText } from '../../../../../../../api'; -import { BatchUpdates, CreateMessageHook, SendMessageHook, UseMountEffect } from '../../../../../../../hooks'; -import { NitroCardGridView } from '../../../../../../../layout'; -import { NitroLayoutBase } from '../../../../../../../layout/base'; -import { NotificationAlertType } from '../../../../../../../views/notification-center/common/NotificationAlertType'; -import { NotificationUtilities } from '../../../../../../../views/notification-center/common/NotificationUtilities'; -import { CatalogLayoutProps } from '../../CatalogLayout.types'; -import { MarketplaceOfferData } from '../common/MarketplaceOfferData'; -import { MarketPlaceOfferState } from '../common/MarketplaceOfferState'; -import { MarketplaceItemView, OWN_OFFER } from '../marketplace-item/MarketplaceItemView'; - -export interface CatalogLayoutMarketplaceOwnItemsViewProps extends CatalogLayoutProps -{ - -} - -export const CatalogLayoutMarketplaceOwnItemsView: FC = props => -{ - const [ creditsWaiting, setCreditsWaiting ] = useState(0); - const [ offers, setOffers ] = useState(new Map()); - - UseMountEffect(() => - { - SendMessageHook(new GetMarketplaceOwnOffersMessageComposer()); - }); - - const onMarketPlaceOwnOffersEvent = useCallback((event: MarketplaceOwnOffersEvent) => - { - const parser = event.getParser(); - - if(!parser) return; - - const latestOffers = new Map(); - parser.offers.forEach(entry => - { - const offerEntry = new MarketplaceOfferData(entry.offerId, entry.furniId, entry.furniType, entry.extraData, entry.stuffData, entry.price, entry.status, entry.averagePrice, entry.offerCount); - offerEntry.timeLeftMinutes = entry.timeLeftMinutes; - latestOffers.set(entry.offerId, offerEntry); - }); - - BatchUpdates(() => - { - setCreditsWaiting(parser.creditsWaiting); - setOffers(latestOffers); - }); - }, []); - - const onMarketplaceCancelOfferResultEvent = useCallback((event:MarketplaceCancelOfferResultEvent) => - { - const parser = event.getParser(); - - if(!parser) return; - - if(!parser.success) - { - NotificationUtilities.simpleAlert(LocalizeText('catalog.marketplace.cancel_failed'), NotificationAlertType.DEFAULT, null, null, LocalizeText('catalog.marketplace.operation_failed.topic')); - return; - } - - setOffers( prev => - { - const newVal = new Map(prev); - newVal.delete(parser.offerId); - return newVal; - }); - }, []); - - CreateMessageHook(MarketplaceOwnOffersEvent, onMarketPlaceOwnOffersEvent); - CreateMessageHook(MarketplaceCancelOfferResultEvent, onMarketplaceCancelOfferResultEvent); - - const redeemSoldOffers = useCallback(() => - { - setOffers(prev => - { - const newVal = new Map(prev); - - const idsToDelete = []; - - for(const offer of newVal.values()) - { - if(offer.status === MarketPlaceOfferState.SOLD) - { - idsToDelete.push(offer.offerId); - } - } - - for(const offerId of idsToDelete) - { - newVal.delete(offerId); - } - return newVal; - }) - - SendMessageHook(new RedeemMarketplaceOfferCreditsMessageComposer()); - }, []); - - const takeItemBack = useCallback( (offerData: MarketplaceOfferData) => - { - SendMessageHook(new CancelMarketplaceOfferMessageComposer(offerData.offerId)); - }, []); - - return ( - <> - { (creditsWaiting <= 0) && {LocalizeText('catalog.marketplace.redeem.no_sold_items')}} - - { (creditsWaiting > 0) && {LocalizeText('catalog.marketplace.redeem.get_credits', ['count', 'credits'], [Array.from(offers.values()).filter(value => value.status === MarketPlaceOfferState.SOLD).length.toString(), creditsWaiting.toString()])}} - - - -
{LocalizeText('catalog.marketplace.items_found', ['count'], [offers.size.toString()])}
- - { - Array.from(offers.values()).map( (entry, index) => ) - } - - - ); -} diff --git a/src/components/catalog/views/page/layout/marketplace/post-offer/MarketplacePostOfferView.scss b/src/components/catalog/views/page/layout/marketplace/post-offer/MarketplacePostOfferView.scss deleted file mode 100644 index 46306202..00000000 --- a/src/components/catalog/views/page/layout/marketplace/post-offer/MarketplacePostOfferView.scss +++ /dev/null @@ -1,12 +0,0 @@ -.nitro-marketplace-post-offer { - width: 300px; - height: 365px; - - .item-image-container { - width: 75px; - height: 75px; - background-repeat: no-repeat; - background-position: center; - overflow: hidden; - } -} diff --git a/src/components/catalog/views/page/layout/marketplace/post-offer/MarketplacePostOfferView.tsx b/src/components/catalog/views/page/layout/marketplace/post-offer/MarketplacePostOfferView.tsx deleted file mode 100644 index 42e01bfb..00000000 --- a/src/components/catalog/views/page/layout/marketplace/post-offer/MarketplacePostOfferView.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { ImageResult, MakeOfferMessageComposer, Vector3d } from '@nitrots/nitro-renderer'; -import { FC, useCallback, useState } from 'react'; -import { GetRoomEngine, LocalizeText } from '../../../../../../../api'; -import { CatalogPostMarketplaceOfferEvent } from '../../../../../../../events/catalog/CatalogPostMarketplaceOfferEvent'; -import { SendMessageHook, useUiEvent } from '../../../../../../../hooks'; -import { NitroCardContentView, NitroCardHeaderView, NitroCardView, NitroLayoutFlex } from '../../../../../../../layout'; -import { NotificationUtilities } from '../../../../../../../views/notification-center/common/NotificationUtilities'; -import { FurnitureItem } from '../../../../../../inventory/common/FurnitureItem'; -import { useCatalogContext } from '../../../../../context/CatalogContext'; - -export const MarketplacePostOfferView : FC<{}> = props => -{ - const [ item, setItem ] = useState(null); - const [ askingPrice, setAskingPrice ] = useState(0); - const { catalogState = null, dispatchCatalogState = null } = useCatalogContext(); - - const close = useCallback(() => - { - setItem(null); - setAskingPrice(0); - }, []); - - const onCatalogPostMarketplaceOfferEvent = useCallback( (event: CatalogPostMarketplaceOfferEvent) => - { - setItem(event.item); - }, []); - - useUiEvent(CatalogPostMarketplaceOfferEvent.POST_MARKETPLACE, onCatalogPostMarketplaceOfferEvent); - - const getItemImage = useCallback( () => - { - if(!item) return ''; - - let object: ImageResult; - - if(!item.isWallItem) - { - object = GetRoomEngine().getFurnitureFloorImage(item.type, new Vector3d(90,0,0), 64, this, 4293848814, item.extra.toString()); - } - else - { - object = GetRoomEngine().getFurnitureWallImage(item.type, new Vector3d(90,0,0), 64, this, 4293848814, item.extra.toString()); - } - - if(object) - { - const image = object.getImage(); - - if(image) return image.src; - } - return ''; - }, [item]); - - const getFurniTitle = useCallback( () => - { - if(!item) return ''; - - const localizationKey = item.isWallItem ? 'wallItem.name.' + item.type : 'roomItem.name.' + item.type; - - return LocalizeText(localizationKey); - }, [item]); - - const getFurniDescription = useCallback( () => - { - if(!item) return ''; - - const localizationKey = item.isWallItem ? 'wallItem.desc.' + item.type : 'roomItem.desc.' + item.type; - - return LocalizeText(localizationKey); - }, [item]); - - const postItem = useCallback( () => - { - if(isNaN(askingPrice) || askingPrice <= 0 || !item) return; - - NotificationUtilities.confirm(LocalizeText('inventory.marketplace.confirm_offer.info', ['furniname', 'price'], [getFurniTitle(), askingPrice.toString()]), () => - { - SendMessageHook(new MakeOfferMessageComposer(askingPrice, item.isWallItem ? 2 : 1, item.id)); - setItem(null); - }, - () => { setItem(null)}, null, null, LocalizeText('inventory.marketplace.confirm_offer.title')); - }, [askingPrice, getFurniTitle, item]); - - return ( item && - - - - -
-
-
{getFurniTitle()}
-
{getFurniDescription()}
-
- -
- { LocalizeText('inventory.marketplace.make_offer.expiration_info', ['time'], [catalogState.marketplaceConfiguration.offerTime.toString()]) } -
-
-
{ LocalizeText('inventory.marketplace.make_offer.price_request') }
- setAskingPrice(event.target.valueAsNumber) } /> -
-
- { (askingPrice < catalogState.marketplaceConfiguration.minimumPrice || isNaN(askingPrice)) && LocalizeText('inventory.marketplace.make_offer.min_price', ['minprice'], [catalogState.marketplaceConfiguration.minimumPrice.toString()]) } - { askingPrice > catalogState.marketplaceConfiguration.maximumPrice && !isNaN(askingPrice) && - LocalizeText('inventory.marketplace.make_offer.max_price', ['maxprice'], [catalogState.marketplaceConfiguration.maximumPrice.toString()]) - } - { !(askingPrice < catalogState.marketplaceConfiguration.minimumPrice || askingPrice > catalogState.marketplaceConfiguration.maximumPrice || isNaN(askingPrice)) && LocalizeText('inventory.marketplace.make_offer.final_price', ['commission', 'finalprice'], [catalogState.marketplaceConfiguration.commission.toString(), (askingPrice + catalogState.marketplaceConfiguration.commission).toString()])} -
-
- -
- - - ) -} diff --git a/src/components/catalog/views/page/layout/marketplace/public-items/SearchFormView.tsx b/src/components/catalog/views/page/layout/marketplace/public-items/SearchFormView.tsx deleted file mode 100644 index 3fe0d3e6..00000000 --- a/src/components/catalog/views/page/layout/marketplace/public-items/SearchFormView.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import { FC, useCallback, useEffect, useState } from 'react'; -import { LocalizeText } from '../../../../../../../api'; -import { IMarketplaceSearchOptions } from '../common/IMarketplaceSearchOptions'; -import { MarketplaceSearchType } from '../common/MarketplaceSearchType'; - -export interface SearchFormViewProps -{ - searchType: number; - sortTypes: number[]; - onSearch(options: IMarketplaceSearchOptions): void; -} - -export const SearchFormView: FC = props => -{ - const { searchType = null, sortTypes = null, onSearch = null } = props; - const [ sortType, setSortType ] = useState(sortTypes ? sortTypes[0] : 3); // first item of SORT_TYPES_ACTIVITY - const [ searchQuery, setSearchQuery ] = useState(''); - const [ min, setMin ] = useState(0); - const [ max, setMax ] = useState(0); - - const onSortTypeChange = useCallback((sortType: number) => - { - setSortType(sortType); - if(searchType === MarketplaceSearchType.BY_ACTIVITY || searchType === MarketplaceSearchType.BY_VALUE) - onSearch({ minPrice: -1, maxPrice: -1, query: '', type: sortType }); - }, [onSearch, searchType]); - - const onClickSearch = useCallback(() => - { - const minPrice = min > 0 ? min : -1; - const maxPrice = max > 0 ? max : -1; - - onSearch({ minPrice: minPrice, maxPrice: maxPrice, type: sortType, query: searchQuery }) - }, [max, min, onSearch, searchQuery, sortType]); - - useEffect( () => - { - if(!sortTypes || !sortTypes.length) return; - - const sortType = sortTypes[0]; - setSortType(sortType); - - if(searchType === MarketplaceSearchType.BY_ACTIVITY || MarketplaceSearchType.BY_VALUE === searchType) - onSearch({ minPrice: -1, maxPrice: -1, query: '', type: sortType }); - }, [onSearch, searchType, sortTypes]); - - return (<> -
-
{ LocalizeText('catalog.marketplace.sort_order') }
- -
- { searchType === MarketplaceSearchType.ADVANCED && <> -
-
{ LocalizeText('catalog.marketplace.search_name') }
- setSearchQuery(event.target.value)}/> -
- -
-
{ LocalizeText('catalog.marketplace.search_price') }
- setMin(event.target.valueAsNumber) } /> - setMax(event.target.valueAsNumber) } /> -
- - - - } - ); -} diff --git a/src/components/catalog/views/page/layout/pets/CatalogLayoutPetPurchaseView.tsx b/src/components/catalog/views/page/layout/pets/CatalogLayoutPetPurchaseView.tsx index 790a7635..faaaf96a 100644 --- a/src/components/catalog/views/page/layout/pets/CatalogLayoutPetPurchaseView.tsx +++ b/src/components/catalog/views/page/layout/pets/CatalogLayoutPetPurchaseView.tsx @@ -67,8 +67,8 @@ export const CatalogLayoutPetPurchaseView: FC - - { offer.giftable && } + + { offer.giftable && } ); diff --git a/src/components/catalog/views/page/purchase/CatalogPurchaseButtonView.tsx b/src/components/catalog/views/page/purchase/CatalogPurchaseButtonView.tsx index e5941127..fd2601fe 100644 --- a/src/components/catalog/views/page/purchase/CatalogPurchaseButtonView.tsx +++ b/src/components/catalog/views/page/purchase/CatalogPurchaseButtonView.tsx @@ -117,6 +117,6 @@ export const CatalogPurchaseButtonView: FC = pro return ; case CatalogPurchaseState.NONE: default: - return + return } } diff --git a/src/components/catalog/views/page/purchase/CatalogPurchaseGiftButtonView.tsx b/src/components/catalog/views/page/purchase/CatalogPurchaseGiftButtonView.tsx index 3cb88c7a..01428ef2 100644 --- a/src/components/catalog/views/page/purchase/CatalogPurchaseGiftButtonView.tsx +++ b/src/components/catalog/views/page/purchase/CatalogPurchaseGiftButtonView.tsx @@ -21,5 +21,5 @@ export const CatalogPurchaseGiftButtonView: FC{ LocalizeText('catalog.purchase_confirmation.gift') }; + return ; } diff --git a/src/components/catalog/views/page/purchase/CatalogPurchaseView.tsx b/src/components/catalog/views/page/purchase/CatalogPurchaseView.tsx index e94a5fb8..0be416d0 100644 --- a/src/components/catalog/views/page/purchase/CatalogPurchaseView.tsx +++ b/src/components/catalog/views/page/purchase/CatalogPurchaseView.tsx @@ -82,8 +82,8 @@ export const CatalogPurchaseView: FC = props => - - { offer.giftable && } + + { offer.giftable && } ); diff --git a/src/components/catalog/views/select-group/CatalogSelectGroupView.tsx b/src/components/catalog/views/select-group/CatalogSelectGroupView.tsx index 8b8c58c6..d6e0b818 100644 --- a/src/components/catalog/views/select-group/CatalogSelectGroupView.tsx +++ b/src/components/catalog/views/select-group/CatalogSelectGroupView.tsx @@ -1,9 +1,16 @@ -import { FC } from 'react'; +import { Dispatch, FC, SetStateAction } from 'react'; import { LocalizeText } from '../../../../api'; -import { NitroLayoutButton, NitroLayoutFlex } from '../../../../layout'; -import { NitroLayoutBase } from '../../../../layout/base'; +import { Base } from '../../../../common/Base'; +import { Button } from '../../../../common/Button'; +import { Flex } from '../../../../common/Flex'; +import { Text } from '../../../../common/Text'; import { useCatalogContext } from '../../context/CatalogContext'; -import { CatalogSelectGroupViewProps } from './CatalogSelectGroupView.types'; + +export interface CatalogSelectGroupViewProps +{ + selectedGroupIndex: number; + setSelectedGroupIndex: Dispatch>; +} export const CatalogSelectGroupView: FC = props => { @@ -14,27 +21,24 @@ export const CatalogSelectGroupView: FC = props => if(!groups || !groups.length) { return ( - + { LocalizeText('catalog.guild_selector.members_only') } - + + ); } return ( - - - - - + + + + + - + ); } diff --git a/src/components/catalog/views/select-group/CatalogSelectGroupView.types.ts b/src/components/catalog/views/select-group/CatalogSelectGroupView.types.ts deleted file mode 100644 index 328c92e3..00000000 --- a/src/components/catalog/views/select-group/CatalogSelectGroupView.types.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Dispatch, SetStateAction } from 'react'; - -export interface CatalogSelectGroupViewProps -{ - selectedGroupIndex: number; - setSelectedGroupIndex: Dispatch>; -}