about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/ui/components/list_panel.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-05-26 02:55:37 +0200
committerThibG <thib@sitedethib.com>2019-06-13 22:15:31 +0200
commitff88387a4afff249c14511780c59e485a49631b8 (patch)
tree356dcddec37a0e28c243ed81e2cb21d1b36e035c /app/javascript/flavours/glitch/features/ui/components/list_panel.js
parentd99a661f08398238838bf576e86c4be706ee7aa0 (diff)
[Glitch] Improvements to the single column layout
Port 0e445ebb1392c8dbce320509d219f16c7c221406 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/ui/components/list_panel.js')
-rw-r--r--app/javascript/flavours/glitch/features/ui/components/list_panel.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/components/list_panel.js b/app/javascript/flavours/glitch/features/ui/components/list_panel.js
index 50592d357..b2e6925b7 100644
--- a/app/javascript/flavours/glitch/features/ui/components/list_panel.js
+++ b/app/javascript/flavours/glitch/features/ui/components/list_panel.js
@@ -13,7 +13,7 @@ const getOrderedLists = createSelector([state => state.get('lists')], lists => {
     return lists;
   }
 
-  return lists.toList().filter(item => !!item).sort((a, b) => a.get('title').localeCompare(b.get('title')));
+  return lists.toList().filter(item => !!item).sort((a, b) => a.get('title').localeCompare(b.get('title'))).take(4);
 });
 
 const mapStateToProps = state => ({
@@ -37,7 +37,7 @@ class ListPanel extends ImmutablePureComponent {
   render () {
     const { lists } = this.props;
 
-    if (!lists) {
+    if (!lists || lists.isEmpty()) {
       return null;
     }