From d3e2cc6744db22a80cd848c2c0801bdaa2e0222d Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Mon, 13 Nov 2023 19:38:29 +0100 Subject: [PATCH] added wallet reload when user accepts interest offer --- src/components/OffersInterest/ManageInterestOffer.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/OffersInterest/ManageInterestOffer.jsx b/src/components/OffersInterest/ManageInterestOffer.jsx index 7cac2f1..375af91 100644 --- a/src/components/OffersInterest/ManageInterestOffer.jsx +++ b/src/components/OffersInterest/ManageInterestOffer.jsx @@ -6,8 +6,11 @@ import CommonHead from "../UserHeader/CommonHead"; import usersService from "../../services/UsersService"; import LoadingSpinner from "../Spinners/LoadingSpinner"; import OthersInterestedTable from "./OthersInterestedTable"; +import { useDispatch } from "react-redux"; +import { tableReload } from "../../store/TableReloads"; export default function ManageInterestOffer(props) { + const dispatch = useDispatch() const navigate = useNavigate() const apiCall = new usersService() @@ -89,6 +92,7 @@ export default function ManageInterestOffer(props) { setRedirectTime(prev => prev - 1) }, 1000); setRequestStatus({loading: false, status: true, message: `Offer ${name}ed`, processType: ''}) + dispatch(tableReload({ type: "WALLETTABLE" })); setTimeout(()=>{ navigate('/offer-interest', {replace: true}) clearInterval(intervalTime)