fix(ui): default guardrails page to first tab for admins, not submitted (#29872)
The Guardrails page hardcoded defaultActiveKey="submitted", so admins landed on the "Submitted Guardrails" tab (the last of their four tabs) instead of the primary view. The original intent was for non-admins, whose only tab is Submitted Guardrails, to default there; admins should open on their first tab. Make the default role-aware: admins default to the first tab (Guardrail Garden), non-admins keep Submitted Guardrails.
This commit is contained in:
parent
13924fa1d6
commit
3448bf79f8
@ -133,7 +133,7 @@ const GuardrailsPanel: React.FC<GuardrailsPanelProps> = ({ accessToken, userRole
|
||||
return (
|
||||
<div className="w-full mx-auto flex-auto overflow-y-auto m-8 p-2">
|
||||
<Tabs
|
||||
defaultActiveKey="submitted"
|
||||
defaultActiveKey="guardrails"
|
||||
items={[
|
||||
...(isAdmin
|
||||
? [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user