virtual card country fixed #836
@@ -15,9 +15,10 @@ export default function MarketPlace({ commonHeadData }) {
|
||||
const marketData = jobLists?.result_list;
|
||||
const categories = jobLists?.categories;
|
||||
const image_server = jobLists?.session_image_server;
|
||||
console.log('Lenth', marketData?.length )
|
||||
|
||||
useEffect(()=>{
|
||||
if(marketData?.length < 1 && !jobLists.loading){
|
||||
if(!jobLists.loading && (marketData?.length < 1 || !marketData)){
|
||||
dispatch(tableReload({ type: "MARKETTABLELIST" })); // reloads market page
|
||||
}
|
||||
},[])
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useSelector } from "react-redux";
|
||||
import { useSelector, useDispatch } from "react-redux";
|
||||
import usersService from "../../services/UsersService";
|
||||
import Layout from "../Partials/Layout";
|
||||
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
||||
import WalletBox from "./WalletBox";
|
||||
import { tableReload } from '../../store/TableReloads';
|
||||
|
||||
const WalletRoutes = () => {
|
||||
const dispatch = useDispatch()
|
||||
|
||||
const apiCall = new usersService();
|
||||
const { walletDetails } = useSelector((state) => state?.walletDetails); // WALLET STORE
|
||||
const { walletTable } = useSelector((state) => state.tableReload);
|
||||
@@ -60,6 +63,12 @@ const WalletRoutes = () => {
|
||||
getPaymentHistory();
|
||||
}, [walletTable]);
|
||||
|
||||
useEffect(()=>{
|
||||
if(!walletDetails.loading && walletDetails?.data?.length < 1){
|
||||
dispatch(tableReload({ type: "WALLETTABLE" })); // reloads wallet page
|
||||
}
|
||||
},[])
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
<WalletBox
|
||||
|
||||
@@ -45,7 +45,7 @@ const VirtualAddCardPopout = ({ details, onClose, situation, walletItem }) => {
|
||||
|
||||
const { userDetails } = useSelector((state) => state.userDetails);
|
||||
|
||||
const countryCode = userDetails?.country
|
||||
const countryCode = walletItem?.country
|
||||
|
||||
const userApi = new usersService()
|
||||
|
||||
|
||||
@@ -211,6 +211,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
getMyJobList();
|
||||
}, [jobListTable, isLogin.status]);
|
||||
|
||||
//FUNCTION TO GET FULL USER WALLETS
|
||||
useEffect(() => {
|
||||
if((!loggedIn && !isLogin.status) || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user