Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/app/story/[storylineId]/[plotIndex]/page.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -56,6 +57,11 @@ export default async function PlotDetailPage({ params }: { params: Params }) {
return <NotFound message="Invalid plot URL" />;
}

// Genesis (plot 0) redirects to the main story page
if (pidx === 0) {
redirect(`/story/${sid}`);
}

const supabase = createServerClient();
if (!supabase) return <NotFound message="Database unavailable" />;

Expand Down
Loading