useMarketplaceConfiguration: lift the marketplace config self-fetch

MarketplacePostOfferView was both *the* fetcher and the listener for
MarketplaceConfigurationEvent — it dispatched
GetMarketplaceConfigurationMessageComposer from one effect when item
was set, then routed the response through setCatalogOptions.

useCatalog never touched the field; it was passing through catalogOptions
purely as a transport mechanism for this single component to talk to
itself. Replace with useMarketplaceConfiguration() — staleTime Infinity
(server-side constants for a session), enabled on item, single tidy
data path.

Drops marketplaceConfiguration from ICatalogOptions; with petPalettes
out too, ICatalogOptions is now just { clubGifts }. clubGifts is the
last one and needs invalidation (server pushes ClubGiftInfoEvent after
SelectClubGiftComposer) so it stays put until useNitroEventInvalidator
companion lands.
This commit is contained in:
simoleo89
2026-05-11 22:32:35 +02:00
parent 3947781495
commit 9a807bf335
4 changed files with 33 additions and 27 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
import { ClubGiftInfoParser, MarketplaceConfigurationMessageParser } from '@nitrots/nitro-renderer';
import { ClubGiftInfoParser } from '@nitrots/nitro-renderer';
export interface ICatalogOptions
{
clubGifts?: ClubGiftInfoParser;
marketplaceConfiguration?: MarketplaceConfigurationMessageParser;
}