Skip to content

Commit f9995ff

Browse files
authored
Merge pull request #3022 from sumitdaga/issue-2981
fixes issue 2981
2 parents 767281e + 3f94f43 commit f9995ff

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
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>

src/components/Feed/Feed.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
margin-top: $base-unit;
112112
white-space: nowrap;
113113

114-
> span + span::before {
114+
> span::before {
115115
content: "";
116116
display: inline;
117117
margin: 0 2px;

0 commit comments

Comments
 (0)