From 238b962751663937bdcd99187831c1ee91a52af4 Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Mon, 16 Mar 2026 21:32:03 +0000 Subject: [PATCH] [#187] Polish plot detail page: genesis redirect /story/[id]/0 now redirects to /story/[id] (genesis is displayed on the main story page). All other acceptance criteria from #187 were already implemented in PR #227. Fixes #187 Co-Authored-By: Claude Opus 4.6 (1M context) --- src/app/story/[storylineId]/[plotIndex]/page.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/story/[storylineId]/[plotIndex]/page.tsx b/src/app/story/[storylineId]/[plotIndex]/page.tsx index 7c3e8e16..e257082b 100644 --- a/src/app/story/[storylineId]/[plotIndex]/page.tsx +++ b/src/app/story/[storylineId]/[plotIndex]/page.tsx @@ -1,4 +1,5 @@ import { type Metadata } from "next"; +import { redirect } from "next/navigation"; import { createServerClient, type Storyline, type Plot } from "../../../../../lib/supabase"; import { truncateAddress } from "../../../../../lib/utils"; import { ViewTracker } from "../../../../components/ViewCount"; @@ -56,6 +57,11 @@ export default async function PlotDetailPage({ params }: { params: Params }) { return ; } + // Genesis (plot 0) redirects to the main story page + if (pidx === 0) { + redirect(`/story/${sid}`); + } + const supabase = createServerClient(); if (!supabase) return ;