diff --git a/app/javascript/gabsocial/components/notification.js b/app/javascript/gabsocial/components/notification.js index 899fccb9..5801c0ce 100644 --- a/app/javascript/gabsocial/components/notification.js +++ b/app/javascript/gabsocial/components/notification.js @@ -17,6 +17,7 @@ import Text from './text' import DotTextSeperator from './dot_text_seperator' import RelativeTimestamp from './relative_timestamp' import DisplayName from './display_name' +import Dummy from './dummy' class Notification extends ImmutablePureComponent { @@ -30,13 +31,14 @@ class Notification extends ImmutablePureComponent { accounts, createdAt, type, - statusId, + status, isHidden, isUnread, isDeckConnected, } = this.props const count = !!accounts ? accounts.size : 0 + const statusId = !!status ? status.get('id') : undefined let message let icon @@ -91,6 +93,9 @@ class Notification extends ImmutablePureComponent { ) } + const DateWrapperContainer = !!status ? NavLink : Dummy + const statusUrl = !!status ? status.get('uri') : '/' + const containerClasses = CX({ d: 1, px10: !isDeckConnected, @@ -146,9 +151,14 @@ class Notification extends ImmutablePureComponent { !!createdAt && - - - + + + + + } diff --git a/app/javascript/gabsocial/containers/notification_container.js b/app/javascript/gabsocial/containers/notification_container.js index 65457cde..53074008 100644 --- a/app/javascript/gabsocial/containers/notification_container.js +++ b/app/javascript/gabsocial/containers/notification_container.js @@ -63,7 +63,7 @@ const makeMapStateToProps = () => { accounts: accounts, createdAt: lastUpdated, isUnread: isUnread, - statusId: list.get('status'), + status: state.getIn(['statuses', list.get('status')], null), isDeckConnected, } } else if (!isGrouped) { @@ -76,7 +76,7 @@ const makeMapStateToProps = () => { accounts: !!account ? ImmutableList([account]) : ImmutableList(), createdAt: notification.get('created_at'), isUnread: lastReadId < notification.get('id'), - statusId: statusId || undefined, + status: state.getIn(['statuses', statusId], null), isDeckConnected, } }