@loafmarkets/ui 0.1.417 → 0.1.418

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -3049,6 +3049,11 @@ function isSafeUrl(url) {
3049
3049
  return false;
3050
3050
  }
3051
3051
  }
3052
+ function matchesTab(item, tab) {
3053
+ if (tab === "all") return true;
3054
+ if (item.types && item.types.length > 0) return item.types.includes(tab);
3055
+ return item.type === tab;
3056
+ }
3052
3057
  var BREAKING_WINDOW_HOURS = 6;
3053
3058
  var MAX_PINNED_BREAKING = 2;
3054
3059
  var BREAKING_IMPACT_FLOOR = 8;
@@ -3559,7 +3564,7 @@ var PropertyNewsUpdates = React9.forwardRef(
3559
3564
  const cutoff = breakingNow - BREAKING_WINDOW_HOURS * 36e5;
3560
3565
  return breakingCandidates.filter((it) => {
3561
3566
  if (new Date(it.publishedAt).getTime() < cutoff) return false;
3562
- return homeTab === "all" || it.type === homeTab;
3567
+ return matchesTab(it, homeTab);
3563
3568
  });
3564
3569
  }, [breakingCandidates, breakingNow, homeTab]);
3565
3570
  const [dismissedVersion, setDismissedVersion] = React9.useState(0);
@@ -3604,7 +3609,7 @@ var PropertyNewsUpdates = React9.forwardRef(
3604
3609
  }, [totalPages]);
3605
3610
  const paginatedItems = hasItems ? listItems.slice(page * ITEMS_PER_PAGE, page * ITEMS_PER_PAGE + ITEMS_PER_PAGE) : [];
3606
3611
  const homeFilteredItems = React9.useMemo(
3607
- () => hasItems ? listItems.filter((it) => homeTab === "all" || it.type === homeTab) : [],
3612
+ () => hasItems ? listItems.filter((it) => matchesTab(it, homeTab)) : [],
3608
3613
  [hasItems, listItems, homeTab]
3609
3614
  );
3610
3615
  const homeTotalPages = React9.useMemo(
@@ -21952,6 +21957,6 @@ var SparklineChart = React9__default.memo(function SparklineChart2({ data, width
21952
21957
  );
21953
21958
  });
21954
21959
 
21955
- export { AssetSelectorBar, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ContactPopup, Header, HlsVideo, HousePositionSlider, HousePositionSliderMobile, LoafLiquidityBadge, LoafLiquidityLogo, LoginPopup, MobileTradeNav, OfferingProgressCard, OnboardingGuide, Orderbook, owner_booking_default as OwnerBooking, PaymentPopup, PortfolioActivityPanel, PortfolioSummary, PriceChart, PropertyBuy, PropertyCompareBar, PropertyDocuments, PropertyHeroHeader, PropertyHistory, PropertyInspectionTimes, PropertyMediaRow, PropertyNewsUpdates, PropertyOffers, PropertyOverview, PropertyPhotoGallery, PropertySubheader, PropertyTour, PropertyValuation, SentimentBar, SiteFooter, Skeleton, SlideDigit, SparklineChart, ToastProvider, TradeConfirmationModal, TradingSlider, YourOrders, __resetDismissedBreaking, badgeVariants, buttonVariants, extractSparkline, formatAge, hasPendingActivity, rowAgeLabel, useAdaptivePolling, useToast };
21960
+ export { AssetSelectorBar, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ContactPopup, Header, HlsVideo, HousePositionSlider, HousePositionSliderMobile, LoafLiquidityBadge, LoafLiquidityLogo, LoginPopup, MobileTradeNav, OfferingProgressCard, OnboardingGuide, Orderbook, owner_booking_default as OwnerBooking, PaymentPopup, PortfolioActivityPanel, PortfolioSummary, PriceChart, PropertyBuy, PropertyCompareBar, PropertyDocuments, PropertyHeroHeader, PropertyHistory, PropertyInspectionTimes, PropertyMediaRow, PropertyNewsUpdates, PropertyOffers, PropertyOverview, PropertyPhotoGallery, PropertySubheader, PropertyTour, PropertyValuation, SentimentBar, SiteFooter, Skeleton, SlideDigit, SparklineChart, ToastProvider, TradeConfirmationModal, TradingSlider, YourOrders, __resetDismissedBreaking, badgeVariants, buttonVariants, extractSparkline, formatAge, hasPendingActivity, matchesTab, rowAgeLabel, useAdaptivePolling, useToast };
21956
21961
  //# sourceMappingURL=index.mjs.map
21957
21962
  //# sourceMappingURL=index.mjs.map