fix: remove redundant auth check from roadmap page

The page-level isTeamMember() check breaks PPR (Partial Prerendering):
at build time there's no session, so the prerender resolves as a
redirect/404 and the static shell poisons all runtime responses with 404.

Team member gating is already handled by proxy.ts middleware (lines 50-58),
matching how /observability and other team-gated routes work.
This commit is contained in:
Kevin Turcios 2026-04-15 05:23:46 -05:00
parent 0cbd8e0b6c
commit 459f07dde2

View file

@ -1,5 +1,3 @@
import { isTeamMember } from "@/app/utils/auth"
import { redirect } from "next/navigation"
import {
Repeat,
Wrench,
@ -476,10 +474,9 @@ function Metrics() {
}
export default async function RoadmapPage() {
const teamMember = await isTeamMember()
if (!teamMember) {
redirect("/login")
}
// Team member gating is handled by proxy.ts middleware — no auth check here.
// Adding one breaks PPR: at build time there's no session, so the prerender
// would resolve as a redirect/404 and the static shell poisons runtime responses.
return (
<div className="min-h-screen bg-zinc-50 dark:bg-zinc-900">