aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/components')
-rw-r--r--vnext/src/components/Avatar.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/vnext/src/components/Avatar.js b/vnext/src/components/Avatar.js
index 31d7dd34..c42a048a 100644
--- a/vnext/src/components/Avatar.js
+++ b/vnext/src/components/Avatar.js
@@ -4,7 +4,7 @@ import { Link } from 'react-router-dom';
import { UserType } from './Types';
-const Avatar = React.memo(function AvatarComponent(props) {
+const Avatar = React.memo(props => {
return (
<div style={{ display: 'flex' }}>
<div className="msg-avatar">
@@ -26,6 +26,15 @@ const Avatar = React.memo(function AvatarComponent(props) {
export default Avatar;
+export const AvatarLink = React.memo(props => {
+ return (
+ <Link to={{ pathname: props.link || `/${props.user.uname}/` }}>
+ <img src={`//i.juick.com/a/${props.user.uid}.png`} alt={`${props.user.uname}`} />
+ {props.user.uname}
+ </Link>
+ );
+});
+
Avatar.propTypes = {
user: UserType,
link: PropTypes.string,