The observer full project page used to call getProjectDetail without a round, getting cross-round contaminated stats. It now resolves a default — the currently OPEN round the project is in, falling back to the most recently CLOSED one — and renders a selector chip in the score card whenever the project participated in more than one candidate round. Initial selection respects the ?round= query param. A new observer procedure (getProjectRoundsForObserver) returns the project's open or closed rounds for the picker. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
19 lines
560 B
TypeScript
19 lines
560 B
TypeScript
import type { Metadata } from 'next'
|
|
import { ObserverProjectDetail } from '@/components/observer/observer-project-detail'
|
|
|
|
export const metadata: Metadata = { title: 'Project Detail' }
|
|
export const dynamic = 'force-dynamic'
|
|
|
|
export default async function ObserverProjectDetailPage({
|
|
params,
|
|
searchParams,
|
|
}: {
|
|
params: Promise<{ projectId: string }>
|
|
searchParams: Promise<{ round?: string }>
|
|
}) {
|
|
const { projectId } = await params
|
|
const sp = await searchParams
|
|
|
|
return <ObserverProjectDetail projectId={projectId} initialRoundId={sp.round} />
|
|
}
|