@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.js CHANGED
@@ -7583,13 +7583,18 @@ function PropertyOverview({
7583
7583
  if (bedrooms != null) f[0] = { ...f[0], value: String(bedrooms) };
7584
7584
  if (bathrooms != null) f[1] = { ...f[1], value: String(bathrooms) };
7585
7585
  if (carSpaces != null) f[2] = { ...f[2], value: String(carSpaces) };
7586
+ if (overviewData) {
7587
+ if (!overviewData.swimmingPool) f[3] = { ...f[3], label: overviewData.tennisCourt ? "Tennis" : "Pool" };
7588
+ if (!overviewData.garden) f[4] = { ...f[4], label: "Garden" };
7589
+ if (!overviewData.gym) f[5] = { ...f[5], label: "Gym" };
7590
+ }
7586
7591
  return f;
7587
7592
  })();
7588
7593
  const propertyInfo = propertyInfoProp ?? (() => {
7589
7594
  const info = [...DEFAULT_PROPERTY_INFO];
7590
- if (propertyTypeLabel) info[0] = { label: "Property Type", value: propertyTypeLabel };
7595
+ if (propertyTypeLabel && !overviewData) info[0] = { label: "Property Type", value: propertyTypeLabel };
7591
7596
  if (overviewData) {
7592
- info[0] = { label: "Property Type", value: overviewData.propertyType ?? "N/A" };
7597
+ info[0] = { label: "Property Type", value: overviewData.propertyType ?? propertyTypeLabel ?? "N/A" };
7593
7598
  info[1] = { label: "Built", value: String(overviewData.yearBuilt) };
7594
7599
  info[2] = { label: "Ownership", value: overviewData.ownership };
7595
7600
  info[3] = { label: "Zoning", value: overviewData.zoning };
@@ -7598,13 +7603,19 @@ function PropertyOverview({
7598
7603
  }
7599
7604
  return info;
7600
7605
  })();
7606
+ const resolvedTokensIssued = tokensIssued ?? overviewData?.tokensIssued ?? null;
7607
+ const resolvedValuation = overviewData?.offeringValuation ?? (midPrice && resolvedTokensIssued ? midPrice * resolvedTokensIssued : null);
7608
+ const tokenPriceValue = midPrice > 0 ? midPrice : null;
7609
+ const weeklyRent = overviewData?.weeklyRent ?? 0;
7610
+ const annualRent = weeklyRent * 52;
7611
+ const dividendYield = resolvedValuation && annualRent > 0 ? (annualRent / resolvedValuation * 100).toFixed(2) : null;
7601
7612
  const financialItems = financialItemsProp ?? [
7602
- { label: "Token Price", value: `$${midPrice.toFixed(3)}`, gold: true },
7603
- { label: "Property Value", value: `$${(midPrice * (tokensIssued ?? 5e4) / 1e6).toFixed(2)}M` },
7604
- { label: "Weekly Rent", value: overviewData?.weeklyRent ? `$${overviewData.weeklyRent.toLocaleString()}/wk` : "$4,500/wk", badge: "Rented" },
7605
- { label: "Dividend Yield", value: "2.5%" },
7606
- { label: "Total Tokens", value: (tokensIssued ?? 5e4).toLocaleString() },
7607
- { label: "Indicative Listing", value: overviewData?.indicativeListing ?? "LISTED" }
7613
+ { label: "Token Price", value: tokenPriceValue ? `$${tokenPriceValue.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : "N/A", gold: true },
7614
+ { label: "Property Value", value: resolvedValuation ? resolvedValuation >= 1e6 ? `$${(resolvedValuation / 1e6).toFixed(2)}M` : `$${resolvedValuation.toLocaleString()}` : "N/A" },
7615
+ { label: "Weekly Rent", value: weeklyRent > 0 ? `$${weeklyRent.toLocaleString()}/wk` : "N/A", badge: weeklyRent > 0 ? "Rented" : void 0 },
7616
+ { label: "Dividend Yield", value: dividendYield ? `${dividendYield}%` : "N/A" },
7617
+ { label: "Total Tokens", value: resolvedTokensIssued ? resolvedTokensIssued.toLocaleString() : "N/A" },
7618
+ { label: "Indicative Listing", value: overviewData?.indicativeListing ?? "N/A" }
7608
7619
  ];
7609
7620
  const galleryImages = images ?? [];
7610
7621
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [