aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/Message.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/components/Message.js')
-rw-r--r--vnext/src/components/Message.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/vnext/src/components/Message.js b/vnext/src/components/Message.js
index 5667047c..9a15d512 100644
--- a/vnext/src/components/Message.js
+++ b/vnext/src/components/Message.js
@@ -1,5 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
+import { Link } from 'react-router-dom';
import moment from 'moment';
import { UserType } from './Types';
@@ -27,7 +28,7 @@ export default function Message(props) {
</a>
</div>
<div className="msg-tags" itemProp="headline">
- <Tags data={msg.tags || []} />
+ <Tags user={msg.user} data={msg.tags || []} />
</div>
</header>
<div className="msg-txt">
@@ -96,7 +97,7 @@ export default function Message(props) {
function Tags(props) {
return props.data && props.data.map(tag => {
- return (<a key={tag} href={`/tag/${tag}`} title={tag}>{tag}</a>)
+ return (<Link key={tag} to={{ pathname: `/${props.user.uname}`, search: `?tag=${tag}`}} title={tag}>{tag}</Link>)
})
}
@@ -111,6 +112,7 @@ Message.propTypes = {
};
Tags.propTypes = {
+ user: UserType.isRequired,
data: PropTypes.array
}