From 7e40490cddf885803905da66a793453abc5d88a3 Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Thu, 19 Mar 2026 12:29:40 +0000 Subject: [PATCH] [#357] Hide 'Read the first Plot' button when only genesis exists Button was shown even with no chapters, linking to #genesis (useless self-link). Now only rendered when chapters.length > 0. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/app/story/[storylineId]/page.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/app/story/[storylineId]/page.tsx b/src/app/story/[storylineId]/page.tsx index 0f26067a..1317b473 100644 --- a/src/app/story/[storylineId]/page.tsx +++ b/src/app/story/[storylineId]/page.tsx @@ -143,12 +143,14 @@ export default async function StoryPage({ params }: { params: Params }) { {genesis ? ( <> - 0 ? `/story/${id}/1` : "#genesis"} - className="border-accent text-accent hover:bg-accent/10 mt-8 block w-full rounded border py-3 text-center text-sm font-medium transition-colors" - > - Read the first Plot - + {chapters.length > 0 && ( + + Read the first Plot + + )} ) : (