From 9e99b8c068b11ec2d0f3b5d560cae0166c247342 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 18 Feb 2017 02:37:59 +0100 Subject: Fix #642 - Add "empty column" text to home/notifications --- .../components/features/notifications/index.jsx | 27 ++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'app/assets/javascripts/components/features/notifications') diff --git a/app/assets/javascripts/components/features/notifications/index.jsx b/app/assets/javascripts/components/features/notifications/index.jsx index 6d10768de..9532b8af8 100644 --- a/app/assets/javascripts/components/features/notifications/index.jsx +++ b/app/assets/javascripts/components/features/notifications/index.jsx @@ -5,7 +5,7 @@ import Column from '../ui/components/column'; import { expandNotifications, clearNotifications } from '../../actions/notifications'; import NotificationContainer from './containers/notification_container'; import { ScrollContainer } from 'react-router-scroll'; -import { defineMessages, injectIntl } from 'react-intl'; +import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import ColumnSettingsContainer from './containers/column_settings_container'; import { createSelector } from 'reselect'; import Immutable from 'immutable'; @@ -76,20 +76,29 @@ const Notifications = React.createClass({ render () { const { intl, notifications, trackScroll, isLoading } = this.props; - let loadMore = ''; + let loadMore = ''; + let scrollableArea = ''; if (!isLoading && notifications.size > 0) { loadMore = ; } - const scrollableArea = ( -
-
- {notifications.map(item => )} - {loadMore} + if (isLoading || notifications.size > 0) { + scrollableArea = ( +
+
+ {notifications.map(item => )} + {loadMore} +
-
- ); + ); + } else { + scrollableArea = ( +
+ +
+ ); + } if (trackScroll) { return ( -- cgit