added family wallet redeem options
This commit was merged in pull request #629.
This commit is contained in:
@@ -13,6 +13,7 @@ import { updateUserJobList } from "../store/userJobList";
|
||||
import { updateWalletDetails } from "../store/walletDetails";
|
||||
import { familyBannersList } from "../store/FamilyBannerList";
|
||||
import { familyResources } from "../store/FamilyResources";
|
||||
import {familyWalletRedeemOptList} from '../store/FamilyWalletRedeemOpt'
|
||||
|
||||
const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
const apiCall = useMemo(() => new usersService(), []);
|
||||
@@ -291,6 +292,24 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
}, [isLogin.status]);
|
||||
|
||||
|
||||
//FUNCTION TO GET FAMILY WALLET REDEEM OPTIONS
|
||||
useEffect(() => {
|
||||
if((!loggedIn && !isLogin.status) || account_type == 'FULL'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FULL
|
||||
return
|
||||
}
|
||||
const familyWalletRedeemOptions = async () => { // FUNCTION TO GET FAMILY WALLET REDDEM OPTIONS
|
||||
dispatch(familyWalletRedeemOptList({loading: true, image: '', data:{}}))
|
||||
apiCall.getFamilyWalletRedeemOptions().then((res)=>{
|
||||
dispatch(familyWalletRedeemOptList({loading: false, image: res?.data?.session_image_server, data:res?.data?.result_list}))
|
||||
}).catch((err)=>{
|
||||
console.log(err)
|
||||
dispatch(familyWalletRedeemOptList({loading: false, image: '', data:{}}))
|
||||
})
|
||||
};
|
||||
familyWalletRedeemOptions()
|
||||
}, [isLogin.status]);
|
||||
|
||||
|
||||
// RENDER PAGE
|
||||
return isLogin.loading && !loggedIn ? (
|
||||
<LoadingSpinner size="32" color="sky-blue" height="h-screen" />
|
||||
|
||||
Reference in New Issue
Block a user