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:
Swifty 2024-12-19 09:51:01 +01:00 committed by GitHub
parent b1d869aad2
commit 4646de463a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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