From e26282c82559e2f5058c9e53231b2ce367b99190 Mon Sep 17 00:00:00 2001 From: ALi Josheghani Date: Tue, 1 Oct 2024 00:12:03 +0330 Subject: [PATCH] (feat) add handle close custom from handle payment status modal when close navigate to /profile --- .../profile/section/components/ModalPayment.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/pages/profile/section/components/ModalPayment.tsx b/src/pages/profile/section/components/ModalPayment.tsx index d54339f..0461c72 100644 --- a/src/pages/profile/section/components/ModalPayment.tsx +++ b/src/pages/profile/section/components/ModalPayment.tsx @@ -1,6 +1,7 @@ import { Dispatch, SetStateAction } from "react"; import MuiModal from "../../../../common/modal"; import { MdError, MdVerified } from "react-icons/md"; +import { useNavigate } from "react-router-dom"; const ModalPayment = ({ isOpen, @@ -14,9 +15,19 @@ const ModalPayment = ({ message: string; }) => { console.log(isPayment); + const navigate = useNavigate(); + const handleCloseCustom = () => { + setIsOpen(false); + navigate("/profile"); + }; return ( - +
{isPayment ? (