From 6685d62c01940bfd759c021f85cb9b08c8c9a030 Mon Sep 17 00:00:00 2001 From: gooyeduck Date: Sat, 7 Oct 2023 15:29:17 +0600 Subject: [PATCH] feat(admin-ui): sidebar module filter In this commit the feature that is implemented is that to filter the dactivated modules. resolves: #242 --- assets/src/components/modules/Modules.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/assets/src/components/modules/Modules.js b/assets/src/components/modules/Modules.js index f09a84e1..7d13a9f9 100644 --- a/assets/src/components/modules/Modules.js +++ b/assets/src/components/modules/Modules.js @@ -35,7 +35,6 @@ function Modules() { const [activeModule, setActiveModule] = useState(false); const [activeClass, setActiveClass] = useState(false); - // Get from WP data. const { allModules } = useSelect((select) => ({ allModules: select("sgsb").getModules(), @@ -214,12 +213,11 @@ function Modules() {

All Modules - + {activeClass ? ( ) : ( - )}

@@ -230,13 +228,15 @@ function Modules() { > {allModules.map((module) => { return !module.status ? ( -
  • - {module.name} -
  • + !filterActiveModules && ( +
  • + {module.name} +
  • + ) ) : (