diff options
Diffstat (limited to 'vnext')
-rw-r--r-- | vnext/src/components/Avatar.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vnext/src/components/Avatar.js b/vnext/src/components/Avatar.js index c6dc71ec..73b885ad 100644 --- a/vnext/src/components/Avatar.js +++ b/vnext/src/components/Avatar.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import { UserType } from './Types'; @@ -6,7 +7,7 @@ import { UserType } from './Types'; export default function Avatar(props) { return ( <div className="msg-avatar"> - <Link to={{ pathname: `/${props.user.uname}/`}}> + <Link to={{ pathname: props.link || `/${props.user.uname}/`}}> <img src={`//i.juick.com/a/${props.user.uid}.png`} alt={`${props.user.uname}`} /> </Link> </div> @@ -14,5 +15,6 @@ export default function Avatar(props) { } Avatar.propTypes = { - user: UserType + user: UserType, + link: PropTypes.string } |