aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/Message.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-06-18 23:34:47 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:52 +0300
commit3a6ac190800644dba207b0c7b4d65640ca7175c3 (patch)
tree85c2406748d8852a376a48ff61cd5dabf0319f6c /vnext/src/components/Message.js
parent3aee462b5ca9640c43609b288da16eec5394b382 (diff)
fix other links
Diffstat (limited to 'vnext/src/components/Message.js')
-rw-r--r--vnext/src/components/Message.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/vnext/src/components/Message.js b/vnext/src/components/Message.js
index 9a15d512..e03935ce 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>&nbsp;Comment</span>
- </a>
+ </Link>
<a href="#" className="msg-menu msg-button">
<Icon name="ei-link" size="s" />
<span>&nbsp;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>)
})
}