Skip to content

Commit 7ac782a

Browse files
committed
fixes issue 2981
1 parent f65e72d commit 7ac782a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/Feed/Feed.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import _ from 'lodash'
33
import cn from 'classnames'
44
import moment from 'moment'
55
import PropTypes from 'prop-types'
6+
import { Link } from 'react-router-dom'
67
import FeedComments from './FeedComments'
78
import CommentEditToggle from '../ActionCard/CommentEditToggle'
89
import RichTextArea from '../RichTextArea/RichTextArea'
@@ -106,6 +107,7 @@ class Feed extends React.Component {
106107
const self = user && user.userId === currentUser.userId
107108
const title = this.props.newTitle === null || this.props.newTitle === undefined ? this.props.title : this.props.newTitle
108109
const content = topicMessage.newContent === null || topicMessage.newContent === undefined ? topicMessage.rawContent : topicMessage.newContent
110+
const feedLink = window.location.pathname.substr(0, window.location.pathname.indexOf('#')) + `#feed-${id}`
109111

110112
topicHeader = (
111113
<header styleName={'feed-header' + (tag === PROJECT_FEED_TYPE_MESSAGES ? ' is-private' : '' )} ref="header">
@@ -138,7 +140,7 @@ class Feed extends React.Component {
138140
<div styleName="header-info">
139141
<div styleName="title">{title}</div>
140142
<div styleName="header-details">
141-
<span>{moment(topicMessage.date).format('MMM D YYYY')}</span>
143+
<Link to={feedLink}>{moment(topicMessage.date).format('MMM D YYYY')}</Link>
142144
<span>{comments.length} post{comments.length !== 1 ? 's' : ''}</span>
143145
</div>
144146
</div>

0 commit comments

Comments
 (0)