(feat) add handle close custom from handle payment status modal when close navigate to /profile
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import { Dispatch, SetStateAction } from "react";
|
import { Dispatch, SetStateAction } from "react";
|
||||||
import MuiModal from "../../../../common/modal";
|
import MuiModal from "../../../../common/modal";
|
||||||
import { MdError, MdVerified } from "react-icons/md";
|
import { MdError, MdVerified } from "react-icons/md";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
const ModalPayment = ({
|
const ModalPayment = ({
|
||||||
isOpen,
|
isOpen,
|
||||||
@@ -14,9 +15,19 @@ const ModalPayment = ({
|
|||||||
message: string;
|
message: string;
|
||||||
}) => {
|
}) => {
|
||||||
console.log(isPayment);
|
console.log(isPayment);
|
||||||
|
const navigate = useNavigate();
|
||||||
|
const handleCloseCustom = () => {
|
||||||
|
setIsOpen(false);
|
||||||
|
navigate("/profile");
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MuiModal isOpenModal={isOpen} setIsOpenModal={setIsOpen} title="وضعیت">
|
<MuiModal
|
||||||
|
isOpenModal={isOpen}
|
||||||
|
setIsOpenModal={setIsOpen}
|
||||||
|
handleCloseCustom={handleCloseCustom}
|
||||||
|
title="وضعیت"
|
||||||
|
>
|
||||||
<div className="relative w-full h-full px-4 py-2">
|
<div className="relative w-full h-full px-4 py-2">
|
||||||
<div className="w-full h-full flex flex-col gap-4 justify-center items-center">
|
<div className="w-full h-full flex flex-col gap-4 justify-center items-center">
|
||||||
{isPayment ? (
|
{isPayment ? (
|
||||||
|
|||||||
Reference in New Issue
Block a user