fix: scope observer reports preview dialog to selected round
Threads the active roundId through ProjectPreviewDialog and its two callers (filtering tabs, expandable juror table). When a round is in scope, the preview's stats card now matches the per-juror list and the page-level round selector. The roundId prop is optional so the component still works in any future caller that lacks round context. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,7 @@ import { scoreGradient } from '@/components/charts/chart-theme'
|
||||
|
||||
interface ProjectPreviewDialogProps {
|
||||
projectId: string | null
|
||||
roundId?: string
|
||||
open: boolean
|
||||
onOpenChange: (open: boolean) => void
|
||||
}
|
||||
@@ -38,9 +39,9 @@ function ScorePill({ score }: { score: number }) {
|
||||
)
|
||||
}
|
||||
|
||||
export function ProjectPreviewDialog({ projectId, open, onOpenChange }: ProjectPreviewDialogProps) {
|
||||
export function ProjectPreviewDialog({ projectId, roundId, open, onOpenChange }: ProjectPreviewDialogProps) {
|
||||
const { data, isLoading } = trpc.analytics.getProjectDetail.useQuery(
|
||||
{ id: projectId! },
|
||||
{ id: projectId!, roundId },
|
||||
{ enabled: !!projectId && open },
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user