From 78b973e3d4a42e3df52db1186fe5f2d3915ce16f Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Thu, 31 Oct 2024 15:47:01 +0100 Subject: [PATCH] wallet add virtual card update added --- src/components/MyWallet/WalletAction.jsx | 37 ++++++++++++++++++++++-- src/components/MyWallet/WalletBox.jsx | 4 +-- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/src/components/MyWallet/WalletAction.jsx b/src/components/MyWallet/WalletAction.jsx index b2f86ea..2a53c75 100644 --- a/src/components/MyWallet/WalletAction.jsx +++ b/src/components/MyWallet/WalletAction.jsx @@ -2,8 +2,27 @@ import React, { useEffect, useState } from "react"; import usersService from "../../services/UsersService"; import ConfirmNairaWithdraw from "./Popup/ConfirmNairaWithdraw"; import NairaWithdraw from "./Popup/NairaWithdraw"; +import VirtualAddCardPopout from "./walletvirtual/VirtualAddCardPopout"; function WalletAction({ walletItem, payment, openPopUp }) { + + // virtual add card popout + const [virtualPopup, setVirtualPopup] = useState({ show: false, data: {} }); + + /*OPENS the virtual add card popout*/ + const openVirtualPopUp = (value) => { + setVirtualPopup({ + show: true, + data: { ...value }, + }); + }; + + /*Closes the virtual add card popout*/ + const closeVirtualPopUp = () => { + setVirtualPopup({ show: false, data: {} }); + // dispatch(tableReload({ type: "WALLETTABLE" })); + }; + const [showNairaWithdraw, setShowNairaWithdraw] = useState({ show: false, state: {}, @@ -19,13 +38,14 @@ function WalletAction({ walletItem, payment, openPopUp }) {
@@ -71,6 +91,17 @@ function WalletAction({ walletItem, payment, openPopUp }) { situation={showConfirmNairaWithdraw.show} /> )} + + {/* VIRTUAL CARD POPOUT */} + {virtualPopup.show && ( + + )} +
); } diff --git a/src/components/MyWallet/WalletBox.jsx b/src/components/MyWallet/WalletBox.jsx index 14f075e..c0dc6e3 100644 --- a/src/components/MyWallet/WalletBox.jsx +++ b/src/components/MyWallet/WalletBox.jsx @@ -9,11 +9,11 @@ import WalletItemCardVirtual from './walletvirtual/WalletItemCardVirtual' export default function WalletBox({ wallet, payment, countries }) { const { loading, data } = wallet; + // console.log('LOG', data[0]?.extra_actions?.SPEND_FROM_BALANCE[0]) + // const { userDetails } = useSelector((state) => state.userDetails); // const accountType = userDetails?.account_type === "FAMILY"; - // console.log('mumu', data) - return (
-- 2.34.1