From 604434dfacf2960424a11b84ff2a3a11cc046685 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Fri, 29 May 2020 18:30:31 -0400 Subject: [PATCH] Added home items queue indicator in footer bar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Added: - home items queue indicator in footer bar --- .../gabsocial/components/footer_bar.js | 31 ++++++++++++++----- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/app/javascript/gabsocial/components/footer_bar.js b/app/javascript/gabsocial/components/footer_bar.js index 2dc3ac14..30812c2b 100644 --- a/app/javascript/gabsocial/components/footer_bar.js +++ b/app/javascript/gabsocial/components/footer_bar.js @@ -5,6 +5,7 @@ import Button from './button' const mapStateToProps = (state) => ({ notificationCount: state.getIn(['notifications', 'unread']), + homeItemsQueueCount: state.getIn(['timelines', 'home', 'totalQueuedItemsCount']), }) export default @@ -21,7 +22,10 @@ class FooterBar extends PureComponent { } render() { - const { notificationCount } = this.props + const { + notificationCount, + homeItemsQueueCount, + } = this.props if (!me) return false const noRouter = !this.context.router @@ -72,13 +76,24 @@ class FooterBar extends PureComponent { }) const color = props.active ? 'brand' : 'secondary' - const childIcon = props.to === '/notifications' && notificationCount > 0 ? ( -
- - {notificationCount} - -
- ) : null + let childIcon; + if (props.to === '/notifications' && notificationCount > 0) { + childIcon = ( +
+ + {notificationCount} + +
+ ) + } else if (props.to === '/home' && homeItemsQueueCount > 0) { + childIcon = ( +
+ + • + +
+ ) + } return (