market box reduction
This commit was merged in pull request #740.
This commit is contained in:
@@ -145,7 +145,7 @@ export default function Login() {
|
|||||||
localStorage.setItem("member_id", `${res.data.member_id}`);
|
localStorage.setItem("member_id", `${res.data.member_id}`);
|
||||||
localStorage.setItem("uid", `${res.data.uid}`);
|
localStorage.setItem("uid", `${res.data.uid}`);
|
||||||
localStorage.setItem("session_token", `${res.data.session}`);
|
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") {
|
if (res.data?.account_type == "FAMILY") {
|
||||||
sessionStorage.setItem("family_uid", res.data?.family_uid);
|
sessionStorage.setItem("family_uid", res.data?.family_uid);
|
||||||
sessionStorage.setItem("parent_uid", res.data?.parent_uid);
|
sessionStorage.setItem("parent_uid", res.data?.parent_uid);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export default function AvailableJobsCard({
|
|||||||
<>
|
<>
|
||||||
{contentDisplay == "grid" ? (
|
{contentDisplay == "grid" ? (
|
||||||
<div
|
<div
|
||||||
className={`card-style-two w-full h-[426px] p-[20px] bg-white dark:bg-dark-white rounded-2xl section-shadow ${
|
className={`card-style-two w-full h-[326px] p-[20px] bg-white dark:bg-dark-white rounded-2xl section-shadow ${
|
||||||
className || ""
|
className || ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export default function MainSection({
|
|||||||
);
|
);
|
||||||
const [tab, setTab] = useState(Object.keys(marketCategories)[0]);
|
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
|
// Convert to array in order to map
|
||||||
const mappedArray = Object.entries(marketCategories).map(([key, value]) => {
|
const mappedArray = Object.entries(marketCategories).map(([key, value]) => {
|
||||||
|
|||||||
@@ -60,13 +60,6 @@ const WalletRoutes = () => {
|
|||||||
getPaymentHistory();
|
getPaymentHistory();
|
||||||
}, [walletTable]);
|
}, [walletTable]);
|
||||||
|
|
||||||
console.log(
|
|
||||||
"Testing all country: ",
|
|
||||||
allCountries,
|
|
||||||
"Testing wallet: ",
|
|
||||||
walletDetails
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
<Suspense fallback={<LoadingSpinner size="16" color="sky-blue" />}>
|
<Suspense fallback={<LoadingSpinner size="16" color="sky-blue" />}>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { useSelector } from "react-redux";
|
|||||||
|
|
||||||
export default function WalletHeader(props) {
|
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;
|
// debugger;
|
||||||
//props.myWalletList.result_list
|
//props.myWalletList.result_list
|
||||||
let { pathname } = useLocation();
|
let { pathname } = useLocation();
|
||||||
@@ -22,7 +22,7 @@ export default function WalletHeader(props) {
|
|||||||
props.setBalanceDropdown.toggle();
|
props.setBalanceDropdown.toggle();
|
||||||
else navigate("/my-wallet", { replace: true });
|
else navigate("/my-wallet", { replace: true });
|
||||||
}
|
}
|
||||||
console.log('props.myWalletList', wallet_status)
|
// console.log('props.myWalletList', wallet_available_status)
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{account_type == 'FULL' ?
|
{account_type == 'FULL' ?
|
||||||
@@ -50,7 +50,8 @@ export default function WalletHeader(props) {
|
|||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div className="content px-7 pb-7">
|
<div className="content px-7 pb-7">
|
||||||
{(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') ?
|
||||||
<ul>
|
<ul>
|
||||||
{props.myWalletList &&
|
{props.myWalletList &&
|
||||||
props.myWalletList?.length > 0 &&
|
props.myWalletList?.length > 0 &&
|
||||||
@@ -185,7 +186,7 @@ export default function WalletHeader(props) {
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
{(wallet_status == '1' || localStorage.getItem('wallet_status')== '1') &&
|
{(wallet_available_status == 'WALLET_AVAILABLE' || localStorage.getItem('wallet_available_status')== 'WALLET_AVAILABLE') &&
|
||||||
<div className="add-money-btn flex justify-center items-center mt-3">
|
<div className="add-money-btn flex justify-center items-center mt-3">
|
||||||
{/* <button
|
{/* <button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
|
import {useEffect} from 'react'
|
||||||
import WalletRoutes from "../components/MyWallet/Wallet";
|
import WalletRoutes from "../components/MyWallet/Wallet";
|
||||||
|
import { useSelector } from "react-redux";
|
||||||
|
import {useNavigate} from 'react-router-dom'
|
||||||
|
|
||||||
export default function MyWalletPage() {
|
export default function MyWalletPage() {
|
||||||
|
const {userDetails: { account_type, wallet_available_status }} = useSelector((state) => state?.userDetails);
|
||||||
|
const navigate = useNavigate()
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
let walletExist = wallet_available_status || localStorage.getItem('wallet_available_status')
|
||||||
|
console.log(walletExist)
|
||||||
|
if(account_type == 'FULL' && walletExist != 'WALLET_AVAILABLE'){
|
||||||
|
navigate('/', {replace: true})
|
||||||
|
}
|
||||||
|
},[])
|
||||||
|
|
||||||
return <WalletRoutes />;
|
return <WalletRoutes />;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user