@@ -4,9 +4,7 @@ import moment from 'moment'
44import ActionCard from '../ActionCard/ActionCard'
55import Panel from '../Panel/Panel'
66import UserTooltip from '../User/UserTooltip'
7- import { NOTIFICATIONS } from '../../routes/notifications/constants/notifications'
87import RemoveNotification from '../../assets/icons/x-mark-blue.svg'
9- import { toggleNotificationRead } from '../../routes/notifications/actions'
108
119class SystemFeed extends React . Component {
1210 constructor ( props ) {
@@ -22,40 +20,40 @@ class SystemFeed extends React.Component {
2220 authorName += ' ' + user . lastName
2321 }
2422 const renderMessages = ( msg , i ) => {
25- return (
26- < div className = "project-notification" key = { `${ msg . id } -${ i } ` } >
27- < ActionCard >
28- < Panel . Body >
29- < div className = "portrait" id = { `feed-${ msg . id } ` } >
30- < UserTooltip usr = { user } id = { 'CoderBot' } previewAvatar size = { 40 } />
31- </ div >
32- < div className = "object topicBody" >
33- < div className = "card-profile" >
34- < div className = "card-author" >
35- { authorName }
36- </ div >
37- < div className = "card-time" >
38- < span > { moment ( msg . date ) . fromNow ( ) } </ span >
23+ return (
24+ < div className = "project-notification" key = { `${ msg . id } -${ i } ` } >
25+ < ActionCard >
26+ < Panel . Body >
27+ < div className = "portrait" id = { `feed-${ msg . id } ` } >
28+ < UserTooltip usr = { user } id = { 'CoderBot' } previewAvatar size = { 40 } />
29+ </ div >
30+ < div className = "object topicBody" >
31+ < div className = "card-profile" >
32+ < div className = "card-author" >
33+ { authorName }
34+ </ div >
35+ < div className = "card-time" >
36+ < span > { moment ( msg . date ) . fromNow ( ) } </ span >
37+ </ div >
38+ < div className = "hide-project-notification" >
39+ < i className = "icon-remove-notification" onClick = { ( ) => onNotificationRead ( msg ) } > < RemoveNotification /> </ i >
40+ </ div >
3941 </ div >
40- < div className = "hide-project-notification " >
41- < i className = "icon-remove-notification" onClick = { ( ) => onNotificationRead ( msg ) } > < RemoveNotification /> </ i >
42+ < div className = "card-body " >
43+ < span dangerouslySetInnerHTML = { { __html : msg . text } } / >
4244 </ div >
4345 </ div >
44- < div className = "card-body" >
45- < span dangerouslySetInnerHTML = { { __html : msg . text } } />
46- </ div >
47- </ div >
48- </ Panel . Body >
49- </ ActionCard >
46+ </ Panel . Body >
47+ </ ActionCard >
48+ </ div >
49+ )
50+ }
51+ return (
52+ < div className = "project-feed" >
53+ { messages . map ( renderMessages ) }
5054 </ div >
5155 )
5256 }
53- return (
54- < div className = "project-feed" >
55- { messages . map ( renderMessages ) }
56- </ div >
57- )
58- }
5957}
6058
6159SystemFeed . propTypes = {
0 commit comments