From 0d448e03da8d621c11f37baf35b1cfba07575224 Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Sat, 4 Apr 2026 06:17:01 +0100 Subject: [PATCH 1/2] [#822] Replace dual-render hidden/block pattern with CSS grid-template-areas Stats grid and CTA button were rendered twice in DOM (hidden sm:block + sm:hidden), causing MarketCapBox and DeadlineCountdown to mount twice with duplicate API calls and timers. Now rendered once and repositioned via grid-template-areas for mobile vs desktop layout. Fixes #822 Co-Authored-By: Claude Opus 4.6 (1M context) --- src/app/story/[storylineId]/page.tsx | 128 +++++++++++++-------------- 1 file changed, 61 insertions(+), 67 deletions(-) diff --git a/src/app/story/[storylineId]/page.tsx b/src/app/story/[storylineId]/page.tsx index bb660fc4..c97788ce 100644 --- a/src/app/story/[storylineId]/page.tsx +++ b/src/app/story/[storylineId]/page.tsx @@ -315,82 +315,76 @@ function StoryHeader({ ); return ( -
-
- {/* Moleskine book cover */} -
+
+ {/* Moleskine book cover */} +
+
-
-
- - {storyline.genre || "Uncategorized"} - -
-
- - {storyline.title} - -
-
- - {storyline.plot_count} {storyline.plot_count === 1 ? "plot" : "plots"} - -
+ className="pointer-events-none absolute inset-y-[-1px] right-[16px] z-20 w-[5px] rounded-[2px]" + style={{ background: "rgba(139, 69, 19, 0.15)" }} + /> +
+ + {storyline.genre || "Uncategorized"} + +
+
+ + {storyline.title} + +
+
+ + {storyline.plot_count} {storyline.plot_count === 1 ? "plot" : "plots"} +
+
- {/* Right column: info + stats (desktop only) */} -
-

- {storyline.title} -

-
- - + {/* Info column */} +
+

+ {storyline.title} +

+
+ + +
+
+
+ Writer + {truncateAddress(storyline.writer_address)}}> + + + {storyline.writer_type === 1 && }
-
-
- Writer - {truncateAddress(storyline.writer_address)}}> - - - {storyline.writer_type === 1 && } -
-
- Genre - - {storyline.genre || "Uncategorized"} - {storyline.language && storyline.language !== "English" && ( - · {storyline.language} - )} - -
+
+ Genre + + {storyline.genre || "Uncategorized"} + {storyline.language && storyline.language !== "English" && ( + · {storyline.language} + )} +
- - {/* Stats + CTA — desktop only (inside right column) */} - {statsGrid && ( -
{statsGrid}
- )} -
{ctaButton}
- {/* Stats + CTA — mobile only (full-width below cover+info row) */} - {statsGrid && ( -
{statsGrid}
- )} -
{ctaButton}
+ {/* Stats + CTA — rendered once, repositioned via grid areas */} +
+ {statsGrid} +
{ctaButton}
+
); } From 8ece4a2c1826eb556e40e28291cd3a4e6c6986a9 Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Sat, 4 Apr 2026 06:21:21 +0100 Subject: [PATCH 2/2] [#822] Move responsive margin to statsGrid only, not wrapper Fixes empty vertical space on untokenized stories where priceInfo is null and AddPlotButton renders null. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/app/story/[storylineId]/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/story/[storylineId]/page.tsx b/src/app/story/[storylineId]/page.tsx index c97788ce..cf75c45f 100644 --- a/src/app/story/[storylineId]/page.tsx +++ b/src/app/story/[storylineId]/page.tsx @@ -381,8 +381,8 @@ function StoryHeader({
{/* Stats + CTA — rendered once, repositioned via grid areas */} -
- {statsGrid} +
+ {statsGrid &&
{statsGrid}
}
{ctaButton}