diff --git a/src/app/profile/[address]/page.tsx b/src/app/profile/[address]/page.tsx index 1366e610..9ed2f44a 100644 --- a/src/app/profile/[address]/page.tsx +++ b/src/app/profile/[address]/page.tsx @@ -677,51 +677,35 @@ function StoriesTab({ return (
- {/* Writer Stats — structured grid */} + {/* Writer Stats — natural inline */}

Writer Stats

-
- Stories - {storylines.length} -
-
- Plots - {totalPlots} -
-
- Holders - {totalHolders !== undefined ? totalHolders : "—"} -
-
- Views - - {storylines.reduce((sum, s) => sum + (s.view_count ?? 0), 0)} - -
+ Stories: {storylines.length} + Plots: {totalPlots} + Holders: {totalHolders !== undefined ? totalHolders : "—"} + Views: {storylines.reduce((sum, s) => sum + (s.view_count ?? 0), 0)}
-
- Donated - - {totalDonations > BigInt(0) - ? `${formatPrice(formatUnits(totalDonations, 18))} ${RESERVE_LABEL}` - : "—"} +
+
+ Donated:{" "} + + {totalDonations > BigInt(0) ? `${formatPrice(formatUnits(totalDonations, 18))} ${RESERVE_LABEL}` : "—"} + {totalDonations > BigInt(0) && plotUsd != null && ( - ({formatUsdValue(Number(formatUnits(totalDonations, 18)) * plotUsd)}) + ({formatUsdValue(Number(formatUnits(totalDonations, 18)) * plotUsd)}) )} - +
{isOwnProfile && royaltyInfo && ( - <> - Claimable - - {royaltyInfo.unclaimed > BigInt(0) - ? `${formatPrice(formatUnits(royaltyInfo.unclaimed, 18))} ${RESERVE_LABEL}` - : "—"} - {royaltyInfo.unclaimed > BigInt(0) && plotUsd != null && ( - ({formatUsdValue(Number(formatUnits(royaltyInfo.unclaimed, 18)) * plotUsd)}) - )} +
+ Claimable:{" "} + + {royaltyInfo.unclaimed > BigInt(0) ? `${formatPrice(formatUnits(royaltyInfo.unclaimed, 18))} ${RESERVE_LABEL}` : "—"} - + {royaltyInfo.unclaimed > BigInt(0) && plotUsd != null && ( + ({formatUsdValue(Number(formatUnits(royaltyInfo.unclaimed, 18)) * plotUsd)}) + )} +
)}
@@ -830,62 +814,44 @@ function StoryRow({ return (
- {/* Title section */} + {/* Title + badges */}
{storyline.title} -
- {storyline.genre && {storyline.genre}} +
+ {storyline.genre && ( + {storyline.genre} + )} {storyline.sunset ? ( - complete + complete ) : ( - active + active )}
- {/* Stats grid */} + {/* Stats */}
{storyline.token_address && ( )} -
-
- Plots - {storyline.plot_count} -
-
- Holders - {holderCount ?? "—"} -
-
- Views - {formatViewCount(storyline.view_count)} -
-
- Created - - {storyline.block_timestamp - ? new Date(storyline.block_timestamp).toLocaleDateString("en-US", { month: "short", year: "2-digit" }) - : "—"} - -
+
+ Plots: {storyline.plot_count} + Holders: {holderCount ?? "—"} + Views: {formatViewCount(storyline.view_count)} + Created: {storyline.block_timestamp ? new Date(storyline.block_timestamp).toLocaleDateString("en-US", { month: "short", year: "2-digit" }) : "—"}
{storyline.token_address && ( )} -
- - {/* Deadline */} - {!storyline.sunset && storyline.last_plot_time && ( -
+ {!storyline.sunset && storyline.last_plot_time && ( -
- )} + )} +
{/* Genre prompt — own profile */} {isOwnProfile && !storyline.genre && ( @@ -1068,7 +1034,7 @@ function ProfileDonationHistory({ storylineId }: { storylineId: number }) { {donations.map((d) => (
fetchNextPage()} disabled={isFetchingNextPage} - className="text-accent hover:text-foreground mt-2 w-full text-center text-[10px] transition-colors disabled:opacity-50" + className="text-accent hover:text-foreground mt-2 w-full text-center text-xs transition-colors disabled:opacity-50" > {isFetchingNextPage ? "Loading..." : `Load more (${totalCount - donations.length} remaining)`} @@ -1145,23 +1111,20 @@ function StoryDonationCount({ storylineId, tokenAddress }: { storylineId: number if (!data || data.count === 0) { return ( -
- Donations - +
+ Donations:
); } return ( -
- Donations - - {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}
); } @@ -1374,24 +1337,23 @@ function PortfolioTab({ address, isOwnProfile }: { address: string; isOwnProfile {hasHoldings && (

Portfolio

-
- Value - - {formatPrice(formatUnits(totalValue, reserveDecimals))} {RESERVE_LABEL} - {plotUsd && ({formatUsdValue(Number(formatUnits(totalValue, reserveDecimals)) * plotUsd)})} - - Tokens - {holdings!.length} +
+
+ Value:{" "} + {formatPrice(formatUnits(totalValue, reserveDecimals))} {RESERVE_LABEL} + {plotUsd && ({formatUsdValue(Number(formatUnits(totalValue, reserveDecimals)) * plotUsd)})} +
+
Tokens: {holdings!.length}
{bestPick && bestPick.priceChange !== null && ( - <> - Best 24h - +
+ Best 24h:{" "} + {bestPick.storyline.title.slice(0, 20)}{bestPick.storyline.title.length > 20 ? "..." : ""} - = 0 ? "text-accent" : "text-error"}`}> - {bestPick.priceChange >= 0 ? "+" : ""}{bestPick.priceChange.toFixed(1)}% - - + = 0 ? "text-accent" : "text-error"}`}> + {bestPick.priceChange >= 0 ? "+" : ""}{bestPick.priceChange.toFixed(1)}% + +
)}
@@ -1404,52 +1366,41 @@ function PortfolioTab({ address, isOwnProfile }: { address: string; isOwnProfile
{h.storyline.title} {h.storyline.genre && ( - {h.storyline.genre} + {h.storyline.genre} )}
- {/* Stats grid */} -
- Value - - {formatPrice(formatUnits(h.value, h.reserveDecimals))} {RESERVE_LABEL} - {plotUsd && ({formatUsdValue(Number(formatUnits(h.value, h.reserveDecimals)) * plotUsd)})} - - {h.priceChange !== null && ( - <> - Change - = 0 ? "text-accent" : "text-error"}`}> + {/* Stats */} +
+
+ Value:{" "} + {formatPrice(formatUnits(h.value, h.reserveDecimals))} {RESERVE_LABEL} + {plotUsd && ({formatUsdValue(Number(formatUnits(h.value, h.reserveDecimals)) * plotUsd)})} + {h.priceChange !== null && ( + = 0 ? "text-accent" : "text-error"}`}> {h.priceChange >= 0 ? "+" : ""}{h.priceChange.toFixed(1)}% - - )} - Balance - {formatPrice(formatUnits(h.balance, 18))} tokens - Price - - {formatPrice(formatUnits(h.price, 18))} {RESERVE_LABEL} - {plotUsd != null && ({formatUsdValue(Number(formatUnits(h.price, 18)) * plotUsd)})} - + )} +
+
Balance: {formatPrice(formatUnits(h.balance, 18))} tokens
+
+ Price:{" "} + {formatPrice(formatUnits(h.price, 18))} {RESERVE_LABEL} + {plotUsd != null && ({formatUsdValue(Number(formatUnits(h.price, 18)) * plotUsd)})} +
{h.entryPrice !== null && h.entryPrice > 0 && ( - <> - Entry - - {formatPrice(h.entryPrice)} {RESERVE_LABEL} - {plotUsd != null && ({formatUsdValue(h.entryPrice * plotUsd)})} - - +
+ Entry:{" "} + {formatPrice(h.entryPrice)} {RESERVE_LABEL} + {plotUsd != null && ({formatUsdValue(h.entryPrice * plotUsd)})} +
)} {h.lastTraded && ( - <> - Traded - - {new Date(h.lastTraded).toLocaleDateString("en-US", { month: "short", day: "numeric" })} - - +
Traded: {new Date(h.lastTraded).toLocaleDateString("en-US", { month: "short", day: "numeric" })}
)}
@@ -1459,34 +1410,28 @@ function PortfolioTab({ address, isOwnProfile }: { address: string; isOwnProfile {(hasDonationsReceived || (isOwnProfile && hasDonationsGiven)) && (

Donations

-
+
{hasDonationsReceived && ( - <> - Received - - {formatPrice(formatUnits(donationsReceived!.total, 18))} {RESERVE_LABEL} - {plotUsd != null && ({formatUsdValue(Number(formatUnits(donationsReceived!.total, 18)) * plotUsd)})} - - - from {donationsReceived!.count} {donationsReceived!.count === 1 ? "donation" : "donations"} - +
+ Received:{" "} + {formatPrice(formatUnits(donationsReceived!.total, 18))} {RESERVE_LABEL} + {plotUsd != null && ({formatUsdValue(Number(formatUnits(donationsReceived!.total, 18)) * plotUsd)})} + from {donationsReceived!.count} {donationsReceived!.count === 1 ? "donation" : "donations"} +
)} {isOwnProfile && hasDonationsGiven && ( - <> - Given - - {formatPrice(formatUnits(totalDonated, 18))} {RESERVE_LABEL} - {plotUsd != null && totalDonated > BigInt(0) && ({formatUsdValue(Number(formatUnits(totalDonated, 18)) * plotUsd)})} - - - {donationTotalCount} {donationTotalCount === 1 ? "donation" : "donations"} - +
+ Given:{" "} + {formatPrice(formatUnits(totalDonated, 18))} {RESERVE_LABEL} + {plotUsd != null && totalDonated > BigInt(0) && ({formatUsdValue(Number(formatUnits(totalDonated, 18)) * plotUsd)})} + · {donationTotalCount} {donationTotalCount === 1 ? "donation" : "donations"} +
)}
{isOwnProfile && hasDonationsGiven && (
{donationsGiven.map((d) => ( -
+
donFetchNext()} disabled={donFetchingNext} - className="text-accent hover:text-foreground mt-1 w-full text-center text-[10px] transition-colors disabled:opacity-50" + className="text-accent hover:text-foreground mt-1 w-full text-center text-xs transition-colors disabled:opacity-50" > {donFetchingNext ? "Loading..." : `Load more (${donationTotalCount - donationsGiven.length} remaining)`} @@ -1612,7 +1557,7 @@ function PortfolioTradingHistory({ address, plotUsd }: { address: string; plotUs
{/* Row 2: tokens + amount */} -
+
{tokenCount > 0 ? `${formatSupply(tokenCount)} tokens` : ""} {formatPrice(t.reserve_amount)} {RESERVE_LABEL} @@ -1620,7 +1565,7 @@ function PortfolioTradingHistory({ address, plotUsd }: { address: string; plotUs
{/* Row 3: date + tx link */} -
+
{t.block_timestamp && (