@@ -104,7 +99,7 @@ function CompleteConfirmCredit({ onClose, confirmCredit }) {
diff --git a/src/components/MyWallet/Popup/ConfirmNairaWithdraw.jsx b/src/components/MyWallet/Popup/ConfirmNairaWithdraw.jsx
index 6d84ced..011fecf 100644
--- a/src/components/MyWallet/Popup/ConfirmNairaWithdraw.jsx
+++ b/src/components/MyWallet/Popup/ConfirmNairaWithdraw.jsx
@@ -1,9 +1,10 @@
import { useState } from "react";
-import { useNavigate } from "react-router-dom";
import usersService from "../../../services/UsersService";
import InputCom from "../../Helpers/Inputs/InputCom";
import ModalCom from "../../Helpers/ModalCom";
import LoadingSpinner from "../../Spinners/LoadingSpinner";
+import { useDispatch } from "react-redux";
+import { tableReload } from "../../../store/TableReloads";
function ConfirmNairaWithdraw({
payment,
@@ -14,7 +15,7 @@ function ConfirmNairaWithdraw({
setShowNairaWithdraw,
}) {
const apiURL = new usersService();
- const navigate = useNavigate();
+ const dispatch = useDispatch();
let [requestStatus, setRequestStatus] = useState({
message: "",
@@ -90,6 +91,7 @@ function ConfirmNairaWithdraw({
state: res.data,
});
}, 5000);
+ dispatch(tableReload({ type: "WALLETTABLE" }));
return;
})
.catch((error) => {
@@ -101,19 +103,6 @@ function ConfirmNairaWithdraw({
});
};
- const getBack = () => {
- action();
- setShowNairaWithdraw({
- show: true,
- data: {},
- });
- };
-
- const completeWithdrawal = () => {
- action();
- window.location.reload(true);
- };
-
return (
@@ -413,7 +402,7 @@ function ConfirmNairaWithdraw({