From 211dcef2a340b5fec1ca9c47ffafe8d60d89536d Mon Sep 17 00:00:00 2001 From: Chukwumdiebube Date: Mon, 6 Mar 2023 13:03:34 +0100 Subject: [PATCH] added capability to hide --- .env | 3 ++- .env.development | 1 + .env.production | 1 + src/components/Partials/MobileSideBar.jsx | 28 +++++++++++++---------- src/components/Partials/Sidebar.jsx | 15 +++++++----- 5 files changed, 29 insertions(+), 19 deletions(-) diff --git a/.env b/.env index 8a2ac07..5160c34 100755 --- a/.env +++ b/.env @@ -17,4 +17,5 @@ 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_HISTORY_SHOW=1 \ No newline at end of file diff --git a/.env.development b/.env.development index 6e7f41d..20296af 100644 --- a/.env.development +++ b/.env.development @@ -18,3 +18,4 @@ REACT_APP_RESOURCES="Resources" REACT_APP_HISTORY="History" REACT_APP_TRACKING_SHOW=1 +REACT_APP_HISTORY_SHOW=1 diff --git a/.env.production b/.env.production index f87d2cf..df6bf21 100644 --- a/.env.production +++ b/.env.production @@ -18,3 +18,4 @@ REACT_APP_RESOURCES="Resources" REACT_APP_HISTORY="History" REACT_APP_TRACKING_SHOW=0 +REACT_APP_HISTORY_SHOW=0 \ No newline at end of file diff --git a/src/components/Partials/MobileSideBar.jsx b/src/components/Partials/MobileSideBar.jsx index 57c2cb2..c5c5d37 100755 --- a/src/components/Partials/MobileSideBar.jsx +++ b/src/components/Partials/MobileSideBar.jsx @@ -92,7 +92,7 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler }) { className="nav-item flex items-center justify-start space-x-3.5" > - + Reminders @@ -102,26 +102,28 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler }) { -
  • + {process.env.REACT_APP_TRACKING_SHOW ? + (
  • - + {process.env.REACT_APP_TRACKING} -
  • + ) + : ''}
  • - + Calendar @@ -134,26 +136,28 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler }) { className="nav-item flex items-center justify-start space-x-3.5" > - + {process.env.REACT_APP_RESOURCES}
  • -
  • + {process.env.REACT_APP_HISTORY_SHOW ? + (
  • - + - History + {process.env.REACT_APP_HISTORY} -
  • + ) + : ''} @@ -169,7 +173,7 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler }) { className="nav-item flex items-center justify-start space-x-3.5" > - + My Profile @@ -182,7 +186,7 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler }) { className="nav-item flex items-center justify-start space-x-3.5" > - + Settings diff --git a/src/components/Partials/Sidebar.jsx b/src/components/Partials/Sidebar.jsx index 2aabfac..99f79ac 100755 --- a/src/components/Partials/Sidebar.jsx +++ b/src/components/Partials/Sidebar.jsx @@ -151,7 +151,8 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) { -
  • + {process.env.REACT_APP_TRACKING_SHOW ? + (
  • -
  • + ) + : ''}
  • - -
  • + {process.env.REACT_APP_HISTORY_SHOW ? + (
  • - History + {process.env.REACT_APP_HISTORY} -
  • + ) + : ''}