From 59ee61445b84db41814d7ab3bf7d2a3fcc5fe481 Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Mon, 6 Mar 2023 14:07:28 +0100 Subject: [PATCH] shows active resources link when env variable is set to true/1 --- .env | 4 +++- .env.development | 2 ++ .env.production | 2 ++ src/components/Partials/Sidebar.jsx | 8 +++++++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 8a2ac07..aa36b51 100755 --- a/.env +++ b/.env @@ -17,4 +17,6 @@ REACT_APP_TRACKING="Tracking" REACT_APP_RESOURCES="Resources" REACT_APP_HISTORY="History" -REACT_APP_TRACKING_SHOW=1 \ No newline at end of file +REACT_APP_TRACKING_SHOW=1 + +REACT_APP_RESOURCES_SHOW=1 \ No newline at end of file diff --git a/.env.development b/.env.development index 6e7f41d..4b655af 100644 --- a/.env.development +++ b/.env.development @@ -18,3 +18,5 @@ REACT_APP_RESOURCES="Resources" REACT_APP_HISTORY="History" REACT_APP_TRACKING_SHOW=1 + +REACT_APP_RESOURCES_SHOW=1 diff --git a/.env.production b/.env.production index f87d2cf..5232978 100644 --- a/.env.production +++ b/.env.production @@ -18,3 +18,5 @@ REACT_APP_RESOURCES="Resources" REACT_APP_HISTORY="History" REACT_APP_TRACKING_SHOW=0 + +REACT_APP_RESOURCES_SHOW=0 diff --git a/src/components/Partials/Sidebar.jsx b/src/components/Partials/Sidebar.jsx index 2aabfac..67979a5 100755 --- a/src/components/Partials/Sidebar.jsx +++ b/src/components/Partials/Sidebar.jsx @@ -191,11 +191,14 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) { + + {process.env.REACT_APP_RESOURCES_SHOW == 1 ?
  • (navData.isActive ? "active" : ""), + ( + (navData) => (navData.isActive ? "active" : ""), sidebar ? "justify-start space-x-3.5" : "justify-center") }`} > @@ -211,6 +214,9 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) {
  • + : + null + }