diff --git a/app/soapbox/features/notifications/components/notification.js b/app/soapbox/features/notifications/components/notification.js index fe25af054..18d24cd04 100644 --- a/app/soapbox/features/notifications/components/notification.js +++ b/app/soapbox/features/notifications/components/notification.js @@ -36,7 +36,6 @@ class Notification extends ImmutablePureComponent { onFavourite: PropTypes.func.isRequired, onReblog: PropTypes.func.isRequired, onToggleHidden: PropTypes.func.isRequired, - status: ImmutablePropTypes.map, intl: PropTypes.object.isRequired, getScrollPosition: PropTypes.func, updateScrollBottom: PropTypes.func, @@ -58,7 +57,7 @@ class Notification extends ImmutablePureComponent { const { notification } = this.props; if (notification.get('status')) { - this.context.router.history.push(`/@${notification.getIn(['account', 'acct'])}/posts/${notification.get('status')}`); + this.context.router.history.push(`/@${notification.getIn(['account', 'acct'])}/posts/${notification.getIn(['status', 'id'])}`); } else { this.handleOpenProfile(); } @@ -77,17 +76,20 @@ class Notification extends ImmutablePureComponent { } handleHotkeyFavourite = () => { - const { status } = this.props; + const { notification } = this.props; + const status = notification.get('status'); if (status) this.props.onFavourite(status); } handleHotkeyBoost = e => { - const { status } = this.props; + const { notification } = this.props; + const status = notification.get('status'); if (status) this.props.onReblog(status, e); } handleHotkeyToggleHidden = () => { - const { status } = this.props; + const { notification } = this.props; + const status = notification.get('status'); if (status) this.props.onToggleHidden(status); } @@ -105,12 +107,30 @@ class Notification extends ImmutablePureComponent { }; } - renderFollow(notification, account, link) { + renderLink = account => { + return ( + + + + ); + + } + + renderFollow(notification) { const { intl } = this.props; + const account = notification.get('account'); + const link = this.renderLink(account); + return ( -
+
@@ -121,18 +141,21 @@ class Notification extends ImmutablePureComponent {
-
); } - renderFollowRequest(notification, account, link) { + renderFollowRequest(notification) { const { intl, unread } = this.props; + const account = notification.get('account'); + const link = this.renderLink(account); + return ( -
+
@@ -143,7 +166,7 @@ class Notification extends ImmutablePureComponent {
-
); @@ -153,7 +176,7 @@ class Notification extends ImmutablePureComponent { return (