This commit is contained in:
2024-10-10 16:12:46 +05:30
parent a7d3703244
commit 417164cb16

View File

@@ -15,6 +15,7 @@ import { motion } from 'framer-motion'; // Import Framer Motion for animations
import { bytesToMB } from "../../Constants/Constants";
import { useCreateFawateerRequestMutation } from "../../Services/fawateer.maker.service";
import ToastBox from "../../Components/ToastBox";
import { useNavigate } from "react-router-dom";
// Validation schema using Yup
const validationSchema = Yup.object().shape({
@@ -28,6 +29,7 @@ const validationSchema = Yup.object().shape({
const CreateRequest = () => {
const toast = useToast()
const navigate=useNavigate()
const { isOpen, onOpen, onClose } = useDisclosure();
const [selectedInvestor, setSelectorInvestor] = useState({});
const [filePreview, setFilePreview] = useState(null); // State for previewing the file
@@ -75,6 +77,7 @@ const CreateRequest = () => {
),
});
setIsLoading(false);
navigate('/fawateer-history')
return
} else {
toast({