@loafmarkets/ui 0.1.191 → 0.1.192
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 +15 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8559,21 +8559,26 @@ function PropertyOverview({
|
|
|
8559
8559
|
const holdPct = Math.max(0, Math.min(100, (1 - turnover) * 100));
|
|
8560
8560
|
return { holdPct, tradePct: +(100 - holdPct).toFixed(1) };
|
|
8561
8561
|
})();
|
|
8562
|
+
const fmtDollar = (v) => {
|
|
8563
|
+
if (v >= 1e6) return `$${(v / 1e6).toFixed(2)}M`;
|
|
8564
|
+
if (v >= 1e3) return `$${Math.round(v).toLocaleString()}`;
|
|
8565
|
+
return `$${v.toFixed(2)}`;
|
|
8566
|
+
};
|
|
8562
8567
|
const tokenStats = [
|
|
8563
|
-
{ label: "Token Price", value: isLoading && tokenPriceValue == null ? loadingSkeleton : tokenPriceValue ? `$${tokenPriceValue.
|
|
8564
|
-
{ label: "24h Volume", value: isLoading && vol24hDollar == null ? loadingSkeleton : vol24hDollar != null && vol24hDollar > 0 ?
|
|
8565
|
-
{ label: "
|
|
8566
|
-
{ label: "Open Orders", value: isLoading && openOrdersValue == null ? loadingSkeleton : openOrdersValue != null && openOrdersValue > 0 ?
|
|
8567
|
-
{ label: "
|
|
8568
|
+
{ label: "Token Price", value: isLoading && tokenPriceValue == null ? loadingSkeleton : tokenPriceValue ? `$${tokenPriceValue.toFixed(2)}` : "\u2014", gold: true },
|
|
8569
|
+
{ label: "24h Volume", value: isLoading && vol24hDollar == null ? loadingSkeleton : vol24hDollar != null && vol24hDollar > 0 ? fmtDollar(vol24hDollar) : "\u2014" },
|
|
8570
|
+
{ label: "Dividend Yield", value: isLoading && currentDividendYield == null ? loadingSkeleton : currentDividendYield ? `${currentDividendYield}%` : "\u2014" },
|
|
8571
|
+
{ label: "Open Orders", value: isLoading && openOrdersValue == null ? loadingSkeleton : openOrdersValue != null && openOrdersValue > 0 ? fmtDollar(openOrdersValue) : "\u2014" },
|
|
8572
|
+
{ label: "Holders", value: isLoading && holderCount == null ? loadingSkeleton : holderCount != null ? holderCount.toLocaleString() : "\u2014" }
|
|
8568
8573
|
];
|
|
8569
8574
|
const annualDividend = resolvedValuation ? resolvedValuation * 0.02 : null;
|
|
8570
8575
|
const monthlyDivPerShare = annualDividend && resolvedTokensIssued ? annualDividend / 12 / resolvedTokensIssued : null;
|
|
8571
8576
|
const propertyStats = [
|
|
8572
|
-
{ label: "Property Value", value: isLoading && tokenMarketCap == null ? loadingSkeleton : tokenMarketCap ?
|
|
8573
|
-
{ label: "
|
|
8574
|
-
{ label: "Growth (
|
|
8575
|
-
{ label: "Last Dividend", value: isLoading && monthlyDivPerShare == null ? loadingSkeleton : monthlyDivPerShare != null ?
|
|
8576
|
-
{ label: "
|
|
8577
|
+
{ label: "Property Value", value: isLoading && tokenMarketCap == null ? loadingSkeleton : tokenMarketCap ? fmtDollar(tokenMarketCap) : "\u2014" },
|
|
8578
|
+
{ label: "Offers", value: "3" },
|
|
8579
|
+
{ label: "Growth (5yr)", value: "+90%" },
|
|
8580
|
+
{ label: "Last Dividend", value: isLoading && monthlyDivPerShare == null ? loadingSkeleton : monthlyDivPerShare != null ? `$${monthlyDivPerShare.toFixed(2)}` : "\u2014" },
|
|
8581
|
+
{ label: "Next Dividend", value: (() => {
|
|
8577
8582
|
const now = /* @__PURE__ */ new Date();
|
|
8578
8583
|
const lastDay = new Date(now.getFullYear(), now.getMonth() + 1, 0);
|
|
8579
8584
|
while (lastDay.getDay() === 0 || lastDay.getDay() === 6) lastDay.setDate(lastDay.getDate() - 1);
|