diff --git a/src/app/profile/[address]/page.tsx b/src/app/profile/[address]/page.tsx index 9ed2f44a..834a3841 100644 --- a/src/app/profile/[address]/page.tsx +++ b/src/app/profile/[address]/page.tsx @@ -164,13 +164,13 @@ export default function ProfilePage() { ))} @@ -677,35 +677,22 @@ function StoriesTab({ return (
- {/* Writer Stats — natural inline */} + {/* Writer Stats — title outside box */} +

Writer Stats

-

Writer Stats

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}` : "—"} - - {totalDonations > BigInt(0) && plotUsd != null && ( - ({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)}) - )} -
+
+ Received:{" "} + + {totalDonations > BigInt(0) ? `${formatPrice(formatUnits(totalDonations, 18))} ${RESERVE_LABEL}` : "—"} + + {totalDonations > BigInt(0) && plotUsd != null && ( + ({formatUsdValue(Number(formatUnits(totalDonations, 18)) * plotUsd)}) )}
@@ -739,7 +726,8 @@ function StoriesTab({
)} - {/* Story portfolio */} + {/* Stories */} +

Stories

{storylines.map((s) => (
- {/* Title + badges */} -
+ {/* Moleskine book (left) + Info (right) */} +
+ {/* Moleskine book card */} - {storyline.title} +
+
+
+ + {storyline.genre || "Uncategorized"} + +
+
+ + {storyline.title} + +
+
+ + {storyline.plot_count} {storyline.plot_count === 1 ? "plot" : "plots"} + +
+
-
- {storyline.genre && ( - {storyline.genre} - )} - {storyline.sunset ? ( - complete - ) : ( - active - )} + + {/* Info (right) */} +
+ + {storyline.title} + +
+
+ Plots: {storyline.plot_count} + · + {storyline.sunset ? ( + complete + ) : ( + active + )} +
+
Holders: {holderCount ?? "—"}
+
Views: {formatViewCount(storyline.view_count)}
+
Created: {storyline.block_timestamp ? new Date(storyline.block_timestamp).toLocaleDateString("en-US", { month: "short", day: "numeric" }) : "—"}
+
- {/* 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" }) : "—"} -
- {storyline.token_address && ( + {/* TVL + Donations (below book row, no Price) */} + {storyline.token_address && ( +
+ - )} - {!storyline.sunset && storyline.last_plot_time && ( - - )} -
+
+ )} - {/* Genre prompt — own profile */} - {isOwnProfile && !storyline.genre && ( + {/* Deadline */} + {!storyline.sunset && storyline.last_plot_time && (
- +
)} - {/* Royalties + Claim — own profile */} + {/* Royalties — own profile */} {isOwnProfile && storyline.token_address && (
)} - {/* Donation history — own profile */} - {isOwnProfile && storyline.token_address && ( -
- -
- )}
+ {/* Genre prompt — outside the card */} + {isOwnProfile && !storyline.genre && ( +
+ +
+ )} + ); } diff --git a/src/components/WriterTradingStats.tsx b/src/components/WriterTradingStats.tsx index 8e105692..0966b565 100644 --- a/src/components/WriterTradingStats.tsx +++ b/src/components/WriterTradingStats.tsx @@ -12,9 +12,10 @@ import type { Storyline } from "../../lib/supabase"; interface WriterTradingStatsProps { storyline: Storyline; plotUsd?: number | null; + showPrice?: boolean; } -export function WriterTradingStats({ storyline, plotUsd }: WriterTradingStatsProps) { +export function WriterTradingStats({ storyline, plotUsd, showPrice = true }: WriterTradingStatsProps) { const tokenAddress = storyline.token_address as Address; // Fetch price + TVL together so they succeed/fail atomically @@ -44,11 +45,13 @@ export function WriterTradingStats({ storyline, plotUsd }: WriterTradingStatsPro return (
-
- Price:{" "} - {data ? `${formatPrice(data.price)} ${RESERVE_LABEL}` : "—"} - {data && plotUsd && ({formatUsdValue(parseFloat(data.price) * plotUsd)})} -
+ {showPrice && ( +
+ Price:{" "} + {data ? `${formatPrice(data.price)} ${RESERVE_LABEL}` : "—"} + {data && plotUsd && ({formatUsdValue(parseFloat(data.price) * plotUsd)})} +
+ )}
TVL:{" "} {data ? `${formatPrice(data.tvl)} ${RESERVE_LABEL}` : "—"}