From b58927767853d00d3001564598d9bce59eb7fa4e Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Mon, 24 Jun 2024 11:32:57 +0100 Subject: [PATCH] market box reduction --- src/components/AuthPages/Login/index2.jsx | 2 +- src/components/Cards/AvailableJobsCard.jsx | 2 +- src/components/MarketPlace/MainSection.jsx | 2 +- src/components/MyWallet/Wallet.jsx | 7 ------- src/components/MyWallet/WalletHeader.jsx | 9 +++++---- src/views/MyWalletPage.jsx | 14 ++++++++++++++ 6 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/components/AuthPages/Login/index2.jsx b/src/components/AuthPages/Login/index2.jsx index e89483f..56639c4 100644 --- a/src/components/AuthPages/Login/index2.jsx +++ b/src/components/AuthPages/Login/index2.jsx @@ -145,7 +145,7 @@ export default function Login() { localStorage.setItem("member_id", `${res.data.member_id}`); localStorage.setItem("uid", `${res.data.uid}`); localStorage.setItem("session_token", `${res.data.session}`); - localStorage.setItem("wallet_status", `${res.data.wallet_status}`); + localStorage.setItem("wallet_available_status", `${res.data.wallet_available_status}`); if (res.data?.account_type == "FAMILY") { sessionStorage.setItem("family_uid", res.data?.family_uid); sessionStorage.setItem("parent_uid", res.data?.parent_uid); diff --git a/src/components/Cards/AvailableJobsCard.jsx b/src/components/Cards/AvailableJobsCard.jsx index 1c0748d..6d31e94 100644 --- a/src/components/Cards/AvailableJobsCard.jsx +++ b/src/components/Cards/AvailableJobsCard.jsx @@ -34,7 +34,7 @@ export default function AvailableJobsCard({ <> {contentDisplay == "grid" ? (
diff --git a/src/components/MarketPlace/MainSection.jsx b/src/components/MarketPlace/MainSection.jsx index 17654fb..837380f 100644 --- a/src/components/MarketPlace/MainSection.jsx +++ b/src/components/MarketPlace/MainSection.jsx @@ -20,7 +20,7 @@ export default function MainSection({ ); const [tab, setTab] = useState(Object.keys(marketCategories)[0]); - let [contentDisplay, setContentDisplay] = useState("list"); // STATE TO HOLD LIST VIEW STYLE + let [contentDisplay, setContentDisplay] = useState("grid"); // STATE TO HOLD LIST VIEW STYLE // Convert to array in order to map const mappedArray = Object.entries(marketCategories).map(([key, value]) => { diff --git a/src/components/MyWallet/Wallet.jsx b/src/components/MyWallet/Wallet.jsx index 04741e5..e229527 100644 --- a/src/components/MyWallet/Wallet.jsx +++ b/src/components/MyWallet/Wallet.jsx @@ -60,13 +60,6 @@ const WalletRoutes = () => { getPaymentHistory(); }, [walletTable]); - console.log( - "Testing all country: ", - allCountries, - "Testing wallet: ", - walletDetails - ); - return ( }> diff --git a/src/components/MyWallet/WalletHeader.jsx b/src/components/MyWallet/WalletHeader.jsx index 25577be..d1cb728 100644 --- a/src/components/MyWallet/WalletHeader.jsx +++ b/src/components/MyWallet/WalletHeader.jsx @@ -11,7 +11,7 @@ import { useSelector } from "react-redux"; export default function WalletHeader(props) { - const {userDetails: { account_type, wallet_status }} = useSelector((state) => state?.userDetails); + const {userDetails: { account_type, wallet_available_status }} = useSelector((state) => state?.userDetails); // debugger; //props.myWalletList.result_list let { pathname } = useLocation(); @@ -22,7 +22,7 @@ export default function WalletHeader(props) { props.setBalanceDropdown.toggle(); else navigate("/my-wallet", { replace: true }); } - console.log('props.myWalletList', wallet_status) + // console.log('props.myWalletList', wallet_available_status) return ( <> {account_type == 'FULL' ? @@ -50,7 +50,8 @@ export default function WalletHeader(props) {
- {(wallet_status == '1' || localStorage.getItem('wallet_status')== '1') ? + {/* wallet_available_status == 'WALLET_AVAILABLE' */} + {(wallet_available_status == 'WALLET_AVAILABLE' || localStorage.getItem('wallet_available_status')== 'WALLET_AVAILABLE') ?
} - {(wallet_status == '1' || localStorage.getItem('wallet_status')== '1') && + {(wallet_available_status == 'WALLET_AVAILABLE' || localStorage.getItem('wallet_available_status')== 'WALLET_AVAILABLE') &&
{/*