From ba0aac126c0fdc4f683aed9705f5186fcfd6487d Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Fri, 31 May 2024 17:56:48 +0100 Subject: [PATCH] set some links hidden base on wallet status --- .env | 5 ++- .env.development | 5 ++- .env.production | 5 ++- src/components/Partials/MobileSideBar.jsx | 2 +- src/components/Partials/RightSideBar.jsx | 40 ++++++++++++----------- src/components/Partials/Sidebar.jsx | 2 +- 6 files changed, 35 insertions(+), 24 deletions(-) diff --git a/.env b/.env index fcdc42c..7058ea5 100644 --- a/.env +++ b/.env @@ -124,4 +124,7 @@ REACT_APP_MEDIA_LINK='https://dev-media.wrenchboard.com' REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com' # REACT APP CUSTOMTIMER -REACT_APP_CUSTOMTIMER=90 \ No newline at end of file +REACT_APP_CUSTOMTIMER=90 + +#SHOW OR HIDE MY PAGE LINK ROUTE +REACT_APP_SHOW_USER_PAGE=1 \ No newline at end of file diff --git a/.env.development b/.env.development index 5f2d549..5ae253c 100644 --- a/.env.development +++ b/.env.development @@ -92,4 +92,7 @@ REACT_APP_MEDIA_LINK='https://dev-media.wrenchboard.com' REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com' # REACT APP CUSTOMTIMER -REACT_APP_CUSTOMTIMER=90 \ No newline at end of file +REACT_APP_CUSTOMTIMER=90 + +#SHOW OR HIDE MY PAGE LINK ROUTE +REACT_APP_SHOW_USER_PAGE=1 \ No newline at end of file diff --git a/.env.production b/.env.production index cfa2c24..d0871a2 100644 --- a/.env.production +++ b/.env.production @@ -98,4 +98,7 @@ REACT_APP_MEDIA_LINK='https://media.wrenchboard.com' REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com' # REACT APP CUSTOMTIMER -REACT_APP_CUSTOMTIMER=90 \ No newline at end of file +REACT_APP_CUSTOMTIMER=90 + +#SHOW OR HIDE MY PAGE LINK ROUTE +REACT_APP_SHOW_USER_PAGE=0 \ No newline at end of file diff --git a/src/components/Partials/MobileSideBar.jsx b/src/components/Partials/MobileSideBar.jsx index d0a0d57..07b0a21 100644 --- a/src/components/Partials/MobileSideBar.jsx +++ b/src/components/Partials/MobileSideBar.jsx @@ -138,7 +138,7 @@ export default function MobileSidebar({ )} - {userDetails?.account_type !== "FAMILY" && ( + {(userDetails?.account_type !== "FAMILY" && userDetails?.wallet_status) && ( <> {!userDetails?.post_jobs ? (
-
- {/* image */} -
- - - + { Number(process.env.REACT_APP_SHOW_USER_PAGE) == 1 && +
+ {/* image */} +
+ + + +
+ {/* name */} +
+

+ My Page +

+
- {/* name */} -
-

- My Page -

-
-
+ } )} @@ -278,7 +280,7 @@ export default function RightSideBar({ myJobList }) {
{/*JOB LINKS*/} - {userDetails?.account_type !== "FAMILY" && + {(userDetails?.account_type !== "FAMILY" && userDetails?.wallet_status) && myJobList?.data?.result_list?.length > 0 && (
{/* heading */} diff --git a/src/components/Partials/Sidebar.jsx b/src/components/Partials/Sidebar.jsx index 2c250dc..a10c4f6 100644 --- a/src/components/Partials/Sidebar.jsx +++ b/src/components/Partials/Sidebar.jsx @@ -157,7 +157,7 @@ export default function Sidebar({
)} - {userDetails?.account_type !== "FAMILY" && ( + {(userDetails?.account_type !== "FAMILY" && userDetails?.wallet_status) && ( <> {!userDetails?.post_jobs ? (