From bc6adb6f63e2344449d58ecf75b2d8d8e8f62983 Mon Sep 17 00:00:00 2001 From: Chukwumdiebube Date: Mon, 6 Mar 2023 20:14:01 +0100 Subject: [PATCH 1/3] capability to his history --- src/components/Partials/MobileSideBar.jsx | 8 +++++--- src/components/Partials/Sidebar.jsx | 9 +++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/Partials/MobileSideBar.jsx b/src/components/Partials/MobileSideBar.jsx index 57c2cb2..9f29396 100755 --- a/src/components/Partials/MobileSideBar.jsx +++ b/src/components/Partials/MobileSideBar.jsx @@ -141,7 +141,8 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler }) { -
  • + {process.env.REACT_APP_HISTORY_SHOW ? + (
  • - History + {process.env.REACT_APP_HISTORY} -
  • + ) + : ''} diff --git a/src/components/Partials/Sidebar.jsx b/src/components/Partials/Sidebar.jsx index 2aabfac..ac5ac91 100755 --- a/src/components/Partials/Sidebar.jsx +++ b/src/components/Partials/Sidebar.jsx @@ -211,8 +211,8 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) { - -
  • + {process.env.REACT_APP_HISTORY_SHOW ? + (
  • - History + {process.env.REACT_APP_HISTORY} -
  • + ) + : ''} From 8c935b14a5d09ebcf5437acb8f8f00b63429be16 Mon Sep 17 00:00:00 2001 From: Chukwumdiebube Date: Thu, 9 Mar 2023 19:17:26 +0100 Subject: [PATCH 2/3] added env variables --- .env | 3 ++- .env.development | 1 + .env.production | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) 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..5160c34 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 \ No newline at end of file diff --git a/.env.production b/.env.production index f87d2cf..e0d9868 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 From 29a101a0626fa4eb205d04876911a8df8a75d2df Mon Sep 17 00:00:00 2001 From: Chukwumdiebube Date: Thu, 9 Mar 2023 19:28:14 +0100 Subject: [PATCH 3/3] add the true conditional --- src/components/Partials/MobileSideBar.jsx | 2 +- src/components/Partials/Sidebar.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Partials/MobileSideBar.jsx b/src/components/Partials/MobileSideBar.jsx index 9f29396..d66f8d9 100755 --- a/src/components/Partials/MobileSideBar.jsx +++ b/src/components/Partials/MobileSideBar.jsx @@ -141,7 +141,7 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler }) { - {process.env.REACT_APP_HISTORY_SHOW ? + {(process.env.REACT_APP_HISTORY_SHOW == true) ? (
  • - {process.env.REACT_APP_HISTORY_SHOW ? + {(process.env.REACT_APP_HISTORY_SHOW == true) ? (