mirror of
https://github.com/Significant-Gravitas/Auto-GPT.git
synced 2025-01-07 03:17:23 +08:00
fix(store): Uploading to store selects two agents (#9065)
Fixes #9059 ### Changes 🏗️ - Changed agent selection from keying on agent name to keying on agent id
This commit is contained in:
parent
b1d869aad2
commit
4646de463a
@ -107,9 +107,9 @@ export const PublishAgentSelect: React.FC<PublishAgentSelectProps> = ({
|
||||
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{agents.map((agent) => (
|
||||
<div
|
||||
key={agent.name}
|
||||
key={agent.id}
|
||||
className={`cursor-pointer overflow-hidden rounded-2xl transition-all ${
|
||||
selectedAgent === agent.name
|
||||
selectedAgentId === agent.id
|
||||
? "shadow-lg ring-4 ring-violet-600"
|
||||
: "hover:shadow-md"
|
||||
}`}
|
||||
@ -124,7 +124,7 @@ export const PublishAgentSelect: React.FC<PublishAgentSelectProps> = ({
|
||||
}}
|
||||
tabIndex={0}
|
||||
role="button"
|
||||
aria-pressed={selectedAgent === agent.name}
|
||||
aria-pressed={selectedAgentId === agent.id}
|
||||
>
|
||||
<div className="relative h-32 bg-gray-100 dark:bg-gray-700 sm:h-40">
|
||||
<Image
|
||||
|
Loading…
Reference in New Issue
Block a user