about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/lists/index.js
diff options
context:
space:
mode:
authorJakub Mendyk <jakubmendyk.szkola+git@gmail.com>2018-08-26 16:39:37 +0200
committerThibG <thib@sitedethib.com>2019-07-21 20:57:42 +0200
commite9f88f40058a510da9d36feb57f5edf1d98908d9 (patch)
treeb738c1f8a5597c9909905e0ad2bf1ea0c166a2c5 /app/javascript/flavours/glitch/features/lists/index.js
parentf1597e1ab90b1fb291f16977877c6ca79bf89676 (diff)
[Glitch] Add messages informing that collections are empty
Port 5129f6f2aa56afb21708aec552a798d062ccaff9 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/lists/index.js')
-rw-r--r--app/javascript/flavours/glitch/features/lists/index.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/app/javascript/flavours/glitch/features/lists/index.js b/app/javascript/flavours/glitch/features/lists/index.js
index 8b0470c92..bf1b410bb 100644
--- a/app/javascript/flavours/glitch/features/lists/index.js
+++ b/app/javascript/flavours/glitch/features/lists/index.js
@@ -6,12 +6,13 @@ import LoadingIndicator from 'flavours/glitch/components/loading_indicator';
 import Column from 'flavours/glitch/features/ui/components/column';
 import ColumnBackButtonSlim from 'flavours/glitch/components/column_back_button_slim';
 import { fetchLists } from 'flavours/glitch/actions/lists';
-import { defineMessages, injectIntl } from 'react-intl';
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
 import ImmutablePureComponent from 'react-immutable-pure-component';
 import ColumnLink from 'flavours/glitch/features/ui/components/column_link';
 import ColumnSubheading from 'flavours/glitch/features/ui/components/column_subheading';
 import NewListForm from './components/new_list_form';
 import { createSelector } from 'reselect';
+import ScrollableList from 'flavours/glitch/components/scrollable_list';
 
 const messages = defineMessages({
   heading: { id: 'column.lists', defaultMessage: 'Lists' },
@@ -62,13 +63,15 @@ export default class Lists extends ImmutablePureComponent {
 
         <NewListForm />
 
-        <div className='scrollable'>
-          <ColumnSubheading text={intl.formatMessage(messages.subheading)} />
-
+        <ColumnSubheading text={intl.formatMessage(messages.subheading)} />
+        <ScrollableList
+          scrollKey='lists'
+          emptyMessage={emptyMessage}
+        >
           {lists.map(list =>
             <ColumnLink key={list.get('id')} to={`/timelines/list/${list.get('id')}`} icon='list-ul' text={list.get('title')} />
           )}
-        </div>
+        </ScrollableList>
       </Column>
     );
   }