diff --git a/src/components/catalog/CatalogMessageHandler.tsx b/src/components/catalog/CatalogMessageHandler.tsx index 1d811ed1..43659dea 100644 --- a/src/components/catalog/CatalogMessageHandler.tsx +++ b/src/components/catalog/CatalogMessageHandler.tsx @@ -1,4 +1,4 @@ -import { ApproveNameMessageEvent, CatalogPageMessageEvent, CatalogPagesListEvent, CatalogPublishedMessageEvent, ClubGiftInfoEvent, GiftReceiverNotFoundEvent, GiftWrappingConfigurationEvent, HabboClubOffersMessageEvent, LimitedEditionSoldOutEvent, MarketplaceConfigurationEvent, MarketplaceMakeOfferResult, NodeData, ProductOfferEvent, PurchaseErrorMessageEvent, PurchaseNotAllowedMessageEvent, PurchaseOKMessageEvent, SellablePetPalettesMessageEvent, UserSubscriptionEvent } from '@nitrots/nitro-renderer'; +import { ApproveNameMessageEvent, CatalogPageMessageEvent, CatalogPagesListEvent, CatalogPublishedMessageEvent, ClubGiftInfoEvent, GiftReceiverNotFoundEvent, GiftWrappingConfigurationEvent, HabboClubOffersMessageEvent, LimitedEditionSoldOutEvent, MarketplaceMakeOfferResult, NodeData, ProductOfferEvent, PurchaseErrorMessageEvent, PurchaseNotAllowedMessageEvent, PurchaseOKMessageEvent, SellablePetPalettesMessageEvent, UserSubscriptionEvent } from '@nitrots/nitro-renderer'; import { GuildMembershipsMessageEvent } from '@nitrots/nitro-renderer/src/nitro/communication/messages/incoming/user/GuildMembershipsMessageEvent'; import { FC, useCallback } from 'react'; import { GetFurnitureData, GetProductDataForLocalization, LocalizeText, NotificationAlertType, NotificationUtilities } from '../../api'; @@ -289,18 +289,6 @@ export const CatalogMessageHandler: FC<{}> = props => NotificationUtilities.simpleAlert(message, NotificationAlertType.DEFAULT, null, null, title); }, []); - const onMarketplaceConfigurationEvent = useCallback((event: MarketplaceConfigurationEvent) => - { - const parser = event.getParser(); - - setCatalogOptions(prevValue => - { - const marketplaceConfiguration = parser; - - return { ...prevValue, marketplaceConfiguration }; - }); - }, [ setCatalogOptions ]); - const onClubGiftInfoEvent = useCallback((event: ClubGiftInfoEvent) => { const parser = event.getParser(); @@ -330,7 +318,6 @@ export const CatalogMessageHandler: FC<{}> = props => UseMessageEventHook(GiftWrappingConfigurationEvent, onGiftWrappingConfigurationEvent); UseMessageEventHook(ClubGiftInfoEvent, onClubGiftInfoEvent); UseMessageEventHook(MarketplaceMakeOfferResult, onMarketplaceMakeOfferResult); - UseMessageEventHook(MarketplaceConfigurationEvent, onMarketplaceConfigurationEvent); return null; } diff --git a/src/components/catalog/CatalogView.tsx b/src/components/catalog/CatalogView.tsx index 84ab63a0..76a89027 100644 --- a/src/components/catalog/CatalogView.tsx +++ b/src/components/catalog/CatalogView.tsx @@ -1,4 +1,4 @@ -import { FrontPageItem, GetCatalogIndexComposer, GetCatalogPageComposer, GetClubGiftInfo, GetGiftWrappingConfigurationComposer, GetMarketplaceConfigurationMessageComposer, ILinkEventTracker, RoomPreviewer } from '@nitrots/nitro-renderer'; +import { FrontPageItem, GetCatalogIndexComposer, GetCatalogPageComposer, GetClubGiftInfo, GetGiftWrappingConfigurationComposer, ILinkEventTracker, RoomPreviewer } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useState } from 'react'; import { AddEventLinkTracker, GetRoomEngine, LocalizeText, PlaySound, RemoveLinkEventTracker, SendMessageComposer, SoundNames } from '../../api'; import { Column, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../common'; @@ -346,7 +346,6 @@ export const CatalogView: FC<{}> = props => { if(!isVisible || rootNode) return; - SendMessageComposer(new GetMarketplaceConfigurationMessageComposer()); SendMessageComposer(new GetGiftWrappingConfigurationComposer()); SendMessageComposer(new GetClubGiftInfo()); SendMessageComposer(new GetCatalogIndexComposer(currentType));