Default observer reports to active round instead of first round
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m44s
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m44s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -590,10 +590,11 @@ export default function ObserverReportsPage() {
|
|||||||
}))
|
}))
|
||||||
) || []
|
) || []
|
||||||
|
|
||||||
// Set default selected stage
|
// Set default selected stage — prefer the active round, fall back to first
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (stages.length && !selectedValue) {
|
if (stages.length && !selectedValue) {
|
||||||
setSelectedValue(stages[0].id)
|
const active = stages.find((s) => s.status === 'ROUND_ACTIVE')
|
||||||
|
setSelectedValue(active ? active.id : stages[0].id)
|
||||||
}
|
}
|
||||||
}, [stages.length, selectedValue])
|
}, [stages.length, selectedValue])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user