diff --git a/src/app/profile/[address]/page.tsx b/src/app/profile/[address]/page.tsx index 2276c517..81b4965a 100644 --- a/src/app/profile/[address]/page.tsx +++ b/src/app/profile/[address]/page.tsx @@ -693,30 +693,46 @@ function StoriesTab({ const sortedGenres = Array.from(genreCounts.entries()).sort((a, b) => b[1] - a[1]); return ( -
- {/* Writer Stats */} -
-

Writer Stats

-
- - - - BigInt(0) - ? `${formatPrice(formatUnits(totalDonations, 18))} ${RESERVE_LABEL}${plotUsd != null ? ` (≈ ${formatUsdValue(Number(formatUnits(totalDonations, 18)) * plotUsd)})` : ""}` - : "—"} - /> +
+ {/* Writer Stats — compact horizontal row */} +
+
+ Writer + {storylines.length} + stories + · + {totalPlots} + plots + · + {totalHolders !== undefined ? totalHolders : "—"} + holders + · + {totalDonations > BigInt(0) ? ( + <> + {formatPrice(formatUnits(totalDonations, 18))} {RESERVE_LABEL} + {plotUsd != null && ( + (≈ {formatUsdValue(Number(formatUnits(totalDonations, 18)) * plotUsd)}) + )} + + ) : ( + + )} + donated {isOwnProfile && royaltyInfo && ( - BigInt(0) - ? `${formatPrice(formatUnits(royaltyInfo.unclaimed, 18))} ${RESERVE_LABEL}${plotUsd != null ? ` (≈ ${formatUsdValue(Number(formatUnits(royaltyInfo.unclaimed, 18)) * plotUsd)})` : ""}` - : "—"} - /> + <> + · + {royaltyInfo.unclaimed > BigInt(0) ? ( + <> + {formatPrice(formatUnits(royaltyInfo.unclaimed, 18))} {RESERVE_LABEL} + {plotUsd != null && ( + (≈ {formatUsdValue(Number(formatUnits(royaltyInfo.unclaimed, 18)) * plotUsd)}) + )} + + ) : ( + + )} + claimable + )}
@@ -766,15 +782,6 @@ function StoriesTab({ ); } -function StatCell({ label, value }: { label: string; value: string }) { - return ( -
- {label} - {value} -
- ); -} - function StoryRow({ storyline, isOwnProfile, @@ -834,6 +841,7 @@ function StoryRow({ return (
+ {/* Row 1: Title + badges */}
-
- - {storyline.plot_count} {storyline.plot_count === 1 ? "plot" : "plots"} - - - {priceInfo - ? `${formatPrice(priceInfo.pricePerToken)} ${RESERVE_LABEL}${plotUsd != null ? ` (≈ ${formatUsdValue(Number(priceInfo.pricePerToken) * plotUsd)})` : ""}` - : "—"} - - - {holderCount !== undefined ? `${holderCount} holder${holderCount !== 1 ? "s" : ""}` : "—"} - - - {formatViewCount(storyline.view_count)} views - - {isOwnProfile && storyline.token_address && ( - + {/* Row 2: Key stats — inline */} +
+ {storyline.plot_count} {storyline.plot_count === 1 ? "plot" : "plots"} + · + {holderCount !== undefined ? `${holderCount} holder${holderCount !== 1 ? "s" : ""}` : "—"} + · + {formatViewCount(storyline.view_count)} views + · + {priceInfo ? ( + + {formatPrice(priceInfo.pricePerToken)} {RESERVE_LABEL} + {plotUsd != null && ( + (≈ {formatUsdValue(Number(priceInfo.pricePerToken) * plotUsd)}) + )} + + ) : ( + + )} + {storyline.block_timestamp && ( + <> + · + + {new Date(storyline.block_timestamp).toLocaleDateString("en-US", { + month: "short", + day: "numeric", + year: "numeric", + })} + + )}
- {storyline.block_timestamp && ( -
- Created{" "} - {new Date(storyline.block_timestamp).toLocaleDateString("en-US", { - month: "short", - day: "numeric", - year: "numeric", - })} -
+ {/* Deadline countdown — own profile only, active storylines */} + {isOwnProfile && !storyline.sunset && storyline.last_plot_time && ( + )} {/* Genre prompt — own profile only, when genre not set */} @@ -899,30 +913,33 @@ function StoryRow({ /> )} - {/* Deadline countdown — own profile only, active storylines */} - {isOwnProfile && !storyline.sunset && storyline.last_plot_time && ( - - )} - - {/* Token price + TVL — visible to all */} - {storyline.token_address && ( -
- - {/* Claim royalties — own profile only */} - {isOwnProfile && ( - - )} + {/* Claim royalties — own profile only */} + {isOwnProfile && storyline.token_address && ( +
+
)} - {/* Donation history — own profile only */} - {isOwnProfile && storyline.token_address && ( - + {/* Expandable: TVL, donations, donation history */} + {storyline.token_address && ( +
+ + ▶ more details + ▼ details + +
+ + + {isOwnProfile && ( + + )} +
+
)}
); @@ -1152,13 +1169,20 @@ function StoryDonationCount({ storylineId, tokenAddress }: { storylineId: number }); if (!data || data.count === 0) { - return — donations; + return
No donations
; } return ( - - {formatPrice(formatUnits(data.total, 18))} {RESERVE_LABEL}{plotUsd != null && ` (≈ ${formatUsdValue(Number(formatUnits(data.total, 18)) * plotUsd)})`} ({data.count}) - +
+ Donations + + {formatPrice(formatUnits(data.total, 18))} {RESERVE_LABEL} + + {plotUsd != null && ( + (≈ {formatUsdValue(Number(formatUnits(data.total, 18)) * plotUsd)}) + )} + ({data.count}) +
); }