@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.js
CHANGED
|
@@ -8585,21 +8585,26 @@ function PropertyOverview({
|
|
|
8585
8585
|
const holdPct = Math.max(0, Math.min(100, (1 - turnover) * 100));
|
|
8586
8586
|
return { holdPct, tradePct: +(100 - holdPct).toFixed(1) };
|
|
8587
8587
|
})();
|
|
8588
|
+
const fmtDollar = (v) => {
|
|
8589
|
+
if (v >= 1e6) return `$${(v / 1e6).toFixed(2)}M`;
|
|
8590
|
+
if (v >= 1e3) return `$${Math.round(v).toLocaleString()}`;
|
|
8591
|
+
return `$${v.toFixed(2)}`;
|
|
8592
|
+
};
|
|
8588
8593
|
const tokenStats = [
|
|
8589
|
-
{ label: "Token Price", value: isLoading && tokenPriceValue == null ? loadingSkeleton : tokenPriceValue ? `$${tokenPriceValue.
|
|
8590
|
-
{ label: "24h Volume", value: isLoading && vol24hDollar == null ? loadingSkeleton : vol24hDollar != null && vol24hDollar > 0 ?
|
|
8591
|
-
{ label: "
|
|
8592
|
-
{ label: "Open Orders", value: isLoading && openOrdersValue == null ? loadingSkeleton : openOrdersValue != null && openOrdersValue > 0 ?
|
|
8593
|
-
{ label: "
|
|
8594
|
+
{ label: "Token Price", value: isLoading && tokenPriceValue == null ? loadingSkeleton : tokenPriceValue ? `$${tokenPriceValue.toFixed(2)}` : "\u2014", gold: true },
|
|
8595
|
+
{ label: "24h Volume", value: isLoading && vol24hDollar == null ? loadingSkeleton : vol24hDollar != null && vol24hDollar > 0 ? fmtDollar(vol24hDollar) : "\u2014" },
|
|
8596
|
+
{ label: "Dividend Yield", value: isLoading && currentDividendYield == null ? loadingSkeleton : currentDividendYield ? `${currentDividendYield}%` : "\u2014" },
|
|
8597
|
+
{ label: "Open Orders", value: isLoading && openOrdersValue == null ? loadingSkeleton : openOrdersValue != null && openOrdersValue > 0 ? fmtDollar(openOrdersValue) : "\u2014" },
|
|
8598
|
+
{ label: "Holders", value: isLoading && holderCount == null ? loadingSkeleton : holderCount != null ? holderCount.toLocaleString() : "\u2014" }
|
|
8594
8599
|
];
|
|
8595
8600
|
const annualDividend = resolvedValuation ? resolvedValuation * 0.02 : null;
|
|
8596
8601
|
const monthlyDivPerShare = annualDividend && resolvedTokensIssued ? annualDividend / 12 / resolvedTokensIssued : null;
|
|
8597
8602
|
const propertyStats = [
|
|
8598
|
-
{ label: "Property Value", value: isLoading && tokenMarketCap == null ? loadingSkeleton : tokenMarketCap ?
|
|
8599
|
-
{ label: "
|
|
8600
|
-
{ label: "Growth (
|
|
8601
|
-
{ label: "Last Dividend", value: isLoading && monthlyDivPerShare == null ? loadingSkeleton : monthlyDivPerShare != null ?
|
|
8602
|
-
{ label: "
|
|
8603
|
+
{ label: "Property Value", value: isLoading && tokenMarketCap == null ? loadingSkeleton : tokenMarketCap ? fmtDollar(tokenMarketCap) : "\u2014" },
|
|
8604
|
+
{ label: "Offers", value: "3" },
|
|
8605
|
+
{ label: "Growth (5yr)", value: "+90%" },
|
|
8606
|
+
{ label: "Last Dividend", value: isLoading && monthlyDivPerShare == null ? loadingSkeleton : monthlyDivPerShare != null ? `$${monthlyDivPerShare.toFixed(2)}` : "\u2014" },
|
|
8607
|
+
{ label: "Next Dividend", value: (() => {
|
|
8603
8608
|
const now = /* @__PURE__ */ new Date();
|
|
8604
8609
|
const lastDay = new Date(now.getFullYear(), now.getMonth() + 1, 0);
|
|
8605
8610
|
while (lastDay.getDay() === 0 || lastDay.getDay() === 6) lastDay.setDate(lastDay.getDate() - 1);
|