From bba21a5be2f5799f5a4e53038b5e1fe8a8fd0970 Mon Sep 17 00:00:00 2001 From: Jesse Chan Date: Wed, 12 Aug 2020 18:39:15 +0800 Subject: [PATCH] StatusFilters: hide checking and error filters when none exists These two states are not normal states. --- client/src/javascript/components/sidebar/SidebarFilter.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/src/javascript/components/sidebar/SidebarFilter.js b/client/src/javascript/components/sidebar/SidebarFilter.js index 38537e3e..a3461a72 100644 --- a/client/src/javascript/components/sidebar/SidebarFilter.js +++ b/client/src/javascript/components/sidebar/SidebarFilter.js @@ -35,6 +35,12 @@ class SidebarFilter extends React.Component { }); } + if (this.props.slug === 'checking' || this.props.slug === 'error') { + if (this.props.count === 0) { + return null; + } + } + return (
  • {this.props.icon}