Files
Nitro-V3/src/components/catalog/views/page/layout
simoleo89 2a5b9a4a98 useClubOffers: per-windowId TanStack query for HC offer pages
Two catalog layouts each fire 'new GetClubOffersMessageComposer(windowId)'
on mount and read parser.offers via HabboClubOffersMessageEvent:

  - CatalogLayoutVipBuyView (windowId 1)
  - CatalogLayoutBuildersClubBuyView (windowId 2 / 3, depending on
    the addon variant)

Plus useCatalog used to also listen for HabboClubOffersMessageEvent and
stash the offers in 'catalogOptions.clubOffersByWindowId[windowId]' and
'catalogOptions.clubOffers' (the latter being a backward-compat alias
for windowId 1). Three listeners, three independent requests when all
mounted.

New useClubOffers(windowId) wraps the request/response pair as a
TanStack query keyed by '['nitro', 'catalog', 'clubOffers', windowId]'.
accept(): correlation-key filter (parser.windowId === windowId) so
the same multiplexed event doesn't satisfy the wrong query slot.

Both layouts now read 'const { data: offers = null } = useClubOffers(windowId)';
useCatalog drops the listener, ICatalogOptions drops the
clubOffers / clubOffersByWindowId fields and HabboClubOffersMessageEvent
no longer needs to be imported in useCatalog. The localization-refresh
effect that re-cloned both fields is also dropped — React Query owns
the cache now, and ClubOfferData has no localized strings anyway.
2026-05-11 22:23:19 +02:00
..
🆙 Init V3
2026-01-31 09:10:52 +01:00
🆙 Init V3
2026-01-31 09:10:52 +01:00
2026-03-23 22:14:03 +01:00
2026-03-23 22:14:03 +01:00
2026-03-23 22:14:03 +01:00
2026-03-23 22:14:03 +01:00
2026-03-23 22:14:03 +01:00
🆙 Init V3
2026-01-31 09:10:52 +01:00
2026-03-23 22:14:03 +01:00
2026-03-23 22:14:03 +01:00
2026-03-23 22:14:03 +01:00
2026-03-23 22:14:03 +01:00
2026-03-23 22:14:03 +01:00