diff options
Diffstat (limited to 'vnext/src/components')
-rw-r--r-- | vnext/src/components/Avatar.js | 7 | ||||
-rw-r--r-- | vnext/src/components/Message.js | 14 |
2 files changed, 13 insertions, 8 deletions
diff --git a/vnext/src/components/Avatar.js b/vnext/src/components/Avatar.js index 72b5d2d18..c6dc71ec1 100644 --- a/vnext/src/components/Avatar.js +++ b/vnext/src/components/Avatar.js @@ -1,11 +1,14 @@ import React from 'react'; +import { Link } from 'react-router-dom'; import { UserType } from './Types'; export default function Avatar(props) { return ( - <div className="msg-avatar"><a href={`/${props.user.uname}/`}> - <img src={`//i.juick.com/a/${props.user.uid}.png`} alt={`${props.user.uname}`} /></a> + <div className="msg-avatar"> + <Link to={{ pathname: `/${props.user.uname}/`}}> + <img src={`//i.juick.com/a/${props.user.uid}.png`} alt={`${props.user.uname}`} /> + </Link> </div> ); } diff --git a/vnext/src/components/Message.js b/vnext/src/components/Message.js index 9a15d5127..e03935ced 100644 --- a/vnext/src/components/Message.js +++ b/vnext/src/components/Message.js @@ -16,16 +16,18 @@ export default function Message(props) { <div className="msg-cont" itemProp="blogPost" itemScope="" itemType="http://schema.org/BlogPosting" itemRef="org"> <header className="h"> <span itemProp="author" itemScope="" itemType="http://schema.org/Person"> - <a href={`/${msg.user.uname}/`} itemProp="url" rel="author"><span itemProp="name">{msg.user.uname}</span></a> + <Link to={{ pathname: `/${msg.user.uname}/` }} itemProp="url" rel="author"> + <span itemProp="name">{msg.user.uname}</span> + </Link> </span> <Avatar user={msg.user} /> <div className="msg-ts"> - <a href={`/${msg.user.uname}/${msg.mid}`}> + <Link to={{ pathname: `/${msg.user.uname}/${msg.mid}` }}> <time itemProp="datePublished dateModified" itemType="http://schema.org/Date" dateTime={msg.timestamp} title={moment.utc(msg.timestamp).local().format('lll')}> {moment.utc(msg.timestamp).fromNow()} </time> - </a> + </Link> </div> <div className="msg-tags" itemProp="headline"> <Tags user={msg.user} data={msg.tags || []} /> @@ -67,7 +69,7 @@ export default function Message(props) { )} {!Boolean(msg.ReadOnly) | (visitor.uid === msg.user.uid) && ( <React.Fragment> - <a href={`/${msg.user.uname}/${msg.mid}`} className="a-comment msg-button"> + <Link to={{ pathname: `/${msg.user.uname}/${msg.mid}` }} className="a-comment msg-button"> <span className="msg-button-icon"> <Icon name="ei-comment" size="s" /> {msg.replies > 0 && @@ -79,7 +81,7 @@ export default function Message(props) { } </span> <span> Comment</span> - </a> + </Link> <a href="#" className="msg-menu msg-button"> <Icon name="ei-link" size="s" /> <span> Share</span> @@ -97,7 +99,7 @@ export default function Message(props) { function Tags(props) { return props.data && props.data.map(tag => { - return (<Link key={tag} to={{ pathname: `/${props.user.uname}`, search: `?tag=${tag}`}} title={tag}>{tag}</Link>) + return (<Link key={tag} to={{ pathname: `/${props.user.uname}`, search: `?tag=${tag}` }} title={tag}>{tag}</Link>) }) } |