Skip to content

Commit

Permalink
feat: [Message] support user.url
Browse files Browse the repository at this point in the history
  • Loading branch information
akai committed Jul 5, 2022
1 parent 29eacf4 commit 069664f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Message/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Typing } from '../Typing';
export interface User {
avatar?: string;
name?: string;
url?: string;
[k: string]: any;
}

Expand Down Expand Up @@ -69,7 +70,9 @@ const Message = (props: MessageProps) => {
</div>
)}
<div className="Message-content" role="alert" aria-live="assertive" aria-atomic="false">
{user && user.avatar && <Avatar src={user.avatar} shape="square" alt={user.name} />}
{user && user.avatar && (
<Avatar src={user.avatar} shape="square" alt={user.name} url={user.url} />
)}
{type === 'typing' ? <Typing /> : renderMessageContent(msg)}
</div>
</div>
Expand Down

0 comments on commit 069664f

Please sign in to comment.