@loafmarkets/ui 0.1.32 → 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 +25 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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: `$${
|
|
7578
|
-
{ label: "Property Value", value:
|
|
7579
|
-
{ label: "Weekly Rent", value:
|
|
7580
|
-
{ label: "Dividend Yield", value: "
|
|
7581
|
-
{ label: "Total Tokens", value:
|
|
7582
|
-
{ label: "Indicative Listing", value: overviewData?.indicativeListing ?? "
|
|
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: [
|
|
@@ -10332,8 +10343,12 @@ var formatCurrency5 = (value, opts) => {
|
|
|
10332
10343
|
var formatNumber2 = (value, maximumFractionDigits = 2) => value.toLocaleString("en-US", { minimumFractionDigits: 0, maximumFractionDigits });
|
|
10333
10344
|
var formatTimestamp = (unix) => {
|
|
10334
10345
|
if (!unix) return "\u2014";
|
|
10335
|
-
|
|
10336
|
-
|
|
10346
|
+
let sec;
|
|
10347
|
+
if (unix > 1e18) sec = Math.floor(unix / 1e9);
|
|
10348
|
+
else if (unix > 1e14) sec = Math.floor(unix / 1e6);
|
|
10349
|
+
else if (unix > 1e12) sec = Math.floor(unix / 1e3);
|
|
10350
|
+
else sec = unix;
|
|
10351
|
+
return new Date(sec * 1e3).toLocaleString("en-AU", {
|
|
10337
10352
|
day: "2-digit",
|
|
10338
10353
|
month: "short",
|
|
10339
10354
|
hour: "2-digit",
|