diff options
Diffstat (limited to 'vnext/src/ui/UserInfo.js')
-rw-r--r-- | vnext/src/ui/UserInfo.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/vnext/src/ui/UserInfo.js b/vnext/src/ui/UserInfo.js index 0be93bb8..f44fb77c 100644 --- a/vnext/src/ui/UserInfo.js +++ b/vnext/src/ui/UserInfo.js @@ -6,6 +6,8 @@ import { info, fetchUserUri, update } from '../api'; import Avatar from './Avatar'; import Icon from './Icon'; import SearchBox from './SearchBox'; +// @ts-ignore +import defaultAvatar from './assets/av-96.png'; import './UserInfo.css'; @@ -110,7 +112,11 @@ export function UserLink(props) { }, [props.user]); return ( user.uid ? - <Link key={user.uid} to={`/${user.uname}/`} className="info-avatar"><img src={user.avatar} />{user.uname}</Link> - : <a href={user.uri} className="info-avatar"><img src={user.avatar} />{user.uname}</a> + <Link key={user.uid} to={`/${user.uname}/`} className="info-avatar"> + <img src={user.avatar} />{user.uname} + </Link> + : <a href={user.uri} className="info-avatar"> + <img src={user.avatar || defaultAvatar} />{user.uname} + </a> ); } |