@loafmarkets/ui 0.1.33 → 0.1.34

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
@@ -7558,13 +7558,18 @@ function PropertyOverview({
7558
7558
  if (bedrooms != null) f[0] = { ...f[0], value: String(bedrooms) };
7559
7559
  if (bathrooms != null) f[1] = { ...f[1], value: String(bathrooms) };
7560
7560
  if (carSpaces != null) f[2] = { ...f[2], value: String(carSpaces) };
7561
+ if (overviewData) {
7562
+ if (!overviewData.swimmingPool) f[3] = { ...f[3], label: overviewData.tennisCourt ? "Tennis" : "Pool" };
7563
+ if (!overviewData.garden) f[4] = { ...f[4], label: "Garden" };
7564
+ if (!overviewData.gym) f[5] = { ...f[5], label: "Gym" };
7565
+ }
7561
7566
  return f;
7562
7567
  })();
7563
7568
  const propertyInfo = propertyInfoProp ?? (() => {
7564
7569
  const info = [...DEFAULT_PROPERTY_INFO];
7565
- if (propertyTypeLabel) info[0] = { label: "Property Type", value: propertyTypeLabel };
7570
+ if (propertyTypeLabel && !overviewData) info[0] = { label: "Property Type", value: propertyTypeLabel };
7566
7571
  if (overviewData) {
7567
- info[0] = { label: "Property Type", value: overviewData.propertyType ?? "N/A" };
7572
+ info[0] = { label: "Property Type", value: overviewData.propertyType ?? propertyTypeLabel ?? "N/A" };
7568
7573
  info[1] = { label: "Built", value: String(overviewData.yearBuilt) };
7569
7574
  info[2] = { label: "Ownership", value: overviewData.ownership };
7570
7575
  info[3] = { label: "Zoning", value: overviewData.zoning };
@@ -7573,13 +7578,19 @@ function PropertyOverview({
7573
7578
  }
7574
7579
  return info;
7575
7580
  })();
7581
+ const resolvedTokensIssued = tokensIssued ?? overviewData?.tokensIssued ?? null;
7582
+ const resolvedValuation = overviewData?.offeringValuation ?? (midPrice && resolvedTokensIssued ? midPrice * resolvedTokensIssued : null);
7583
+ const tokenPriceValue = midPrice > 0 ? midPrice : null;
7584
+ const weeklyRent = overviewData?.weeklyRent ?? 0;
7585
+ const annualRent = weeklyRent * 52;
7586
+ const dividendYield = resolvedValuation && annualRent > 0 ? (annualRent / resolvedValuation * 100).toFixed(2) : null;
7576
7587
  const financialItems = financialItemsProp ?? [
7577
- { label: "Token Price", value: `$${midPrice.toFixed(3)}`, gold: true },
7578
- { label: "Property Value", value: `$${(midPrice * (tokensIssued ?? 5e4) / 1e6).toFixed(2)}M` },
7579
- { label: "Weekly Rent", value: overviewData?.weeklyRent ? `$${overviewData.weeklyRent.toLocaleString()}/wk` : "$4,500/wk", badge: "Rented" },
7580
- { label: "Dividend Yield", value: "2.5%" },
7581
- { label: "Total Tokens", value: (tokensIssued ?? 5e4).toLocaleString() },
7582
- { label: "Indicative Listing", value: overviewData?.indicativeListing ?? "LISTED" }
7588
+ { label: "Token Price", value: tokenPriceValue ? `$${tokenPriceValue.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : "N/A", gold: true },
7589
+ { label: "Property Value", value: resolvedValuation ? resolvedValuation >= 1e6 ? `$${(resolvedValuation / 1e6).toFixed(2)}M` : `$${resolvedValuation.toLocaleString()}` : "N/A" },
7590
+ { label: "Weekly Rent", value: weeklyRent > 0 ? `$${weeklyRent.toLocaleString()}/wk` : "N/A", badge: weeklyRent > 0 ? "Rented" : void 0 },
7591
+ { label: "Dividend Yield", value: dividendYield ? `${dividendYield}%` : "N/A" },
7592
+ { label: "Total Tokens", value: resolvedTokensIssued ? resolvedTokensIssued.toLocaleString() : "N/A" },
7593
+ { label: "Indicative Listing", value: overviewData?.indicativeListing ?? "N/A" }
7583
7594
  ];
7584
7595
  const galleryImages = images ?? [];
7585
7596
  return /* @__PURE__ */ jsxs("div", { children: [