aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/Avatar.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/components/Avatar.js')
-rw-r--r--vnext/src/components/Avatar.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/vnext/src/components/Avatar.js b/vnext/src/components/Avatar.js
index f79d7b09..31d7dd34 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';
-export default function Avatar(props) {
+const Avatar = React.memo(function AvatarComponent(props) {
return (
<div style={{ display: 'flex' }}>
<div className="msg-avatar">
@@ -13,16 +13,18 @@ export default function Avatar(props) {
</Link>
</div>
<div style={{ display: 'flex', flexDirection: 'column' }}>
- <span itemProp="author" itemScope="" itemType="http://schema.org/Person">
- <Link to={{ pathname: `/${props.user.uname}/` }} itemProp="url" rel="author">
- <span itemProp="name">{props.user.uname}</span>
+ <span>
+ <Link to={{ pathname: `/${props.user.uname}/` }}>
+ <span>{props.user.uname}</span>
</Link>
</span>
{props.children}
</div>
</div>
);
-}
+});
+
+export default Avatar;
Avatar.propTypes = {
user: UserType,