mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
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:
parent
0cbd8e0b6c
commit
459f07dde2
1 changed files with 3 additions and 6 deletions
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Reference in a new issue