Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion frontend/src/agents/AgentCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,13 @@ export default function AgentCard({
<div className="w-full">
<div className="flex w-full items-center gap-1 px-1">
<img
src={agent.image && agent.image.trim() !== '' ? agent.image : Robot}
// src={agent.image && agent.image.trim() !== '' ? agent.image : Robot}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agent.image should not be replaced; only the onError attribute could be incorporated

src="https://this-is-a-broken-url-for-testing.com/fake-image.png"
alt={`${agent.name}`}
className="h-7 w-7 rounded-full object-contain"
onError={(e) => {
e.currentTarget.src = Robot;
}}
/>
{agent.status === 'draft' && (
<p className="text-xs text-black opacity-50 dark:text-[#E0E0E0]">
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/agents/SharedAgentCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ export default function SharedAgentCard({ agent }: { agent: Agent }) {
<div className="flex h-12 w-12 items-center justify-center overflow-hidden rounded-full p-1">
<img
src={agent.image && agent.image.trim() !== '' ? agent.image : Robot}
alt={`${agent.name}`}
className="h-full w-full rounded-full object-contain"
onError={(e) => {
e.currentTarget.src = Robot;
}}
/>
</div>
<div className="flex max-h-[92px] w-[80%] flex-col gap-px">
Expand Down