Skip to content

Commit

Permalink
fix(InviteAgents): initials on avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
VadymBezpalko committed Sep 27, 2024
1 parent 6ecc7fc commit 9162137
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ const mockAgents = [
name: 'Bob Smith',
email: 'bob@example.com',
status: 'unknown' as const,
avatar: 'https://via.placeholder.com/150',
avatar: '',
},
{
name: 'Alice Johnson',
email: 'alice@example.com',
status: 'available' as const,
avatar: 'https://via.placeholder.com/150',
avatar: undefined,
},
{
name: 'Alice Johnson 2',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,10 @@ const InviteAgentsComponent: FC<InviteAgentsProps> = ({
<div className={styles[`${baseClass}__avatar-container`]}>
{visibleAgents.map((agent, index) => (
<Avatar
text={agent.name}
className={styles[`${baseClass}__avatar`]}
key={agent.email}
type="image"
type={agent.avatar ? 'image' : 'text'}
size="xsmall"
status={agent.status}
src={agent.avatar}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export interface Agent {
name: string;
email: string;
status: 'available' | 'unavailable' | 'unknown';
avatar: string;
avatar?: string;
}

export interface InviteAgentsProps extends ComponentCoreProps {
Expand Down

0 comments on commit 9162137

Please sign in to comment.