From 28f84b178aae91ef38e962a0dcf960f0e3476005 Mon Sep 17 00:00:00 2001
From: YasinShaikh123 <123150391+YasinShaikh123@users.noreply.github.com>
Date: Thu, 14 Nov 2024 17:39:08 +0530
Subject: [PATCH] hot fix
---
src/Pages/IO_Management/CreateIO/AddCashDetails.jsx | 2 +-
src/Pages/IO_Management/CreateIO/IOArtifactsVideo.jsx | 4 ++--
.../ViewIO/HeaderModal/DistributionInvestor.jsx | 6 ++++++
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/Pages/IO_Management/CreateIO/AddCashDetails.jsx b/src/Pages/IO_Management/CreateIO/AddCashDetails.jsx
index 695de3d..d674a3b 100644
--- a/src/Pages/IO_Management/CreateIO/AddCashDetails.jsx
+++ b/src/Pages/IO_Management/CreateIO/AddCashDetails.jsx
@@ -90,9 +90,9 @@ const AddCashDetails = ({ isOpen, onClose, firstField, actionId, setActionId, da
toast({
render: () => ,
});
+ setAlert(false);
}
-
} catch (error) {
console.log(error);
diff --git a/src/Pages/IO_Management/CreateIO/IOArtifactsVideo.jsx b/src/Pages/IO_Management/CreateIO/IOArtifactsVideo.jsx
index 535f7a7..d16b5c3 100644
--- a/src/Pages/IO_Management/CreateIO/IOArtifactsVideo.jsx
+++ b/src/Pages/IO_Management/CreateIO/IOArtifactsVideo.jsx
@@ -152,7 +152,7 @@ const IOArtifactsAdd = ({ isOpen, onClose, firstField, actionId, setActionId, da
-
+
Artifact Name
-
+
Artifact Streaming URL
{
amount: yup
.string()
.required("Amount is required")
+ .test(
+ "is-positive",
+ "Amount should be greater than zero",
+ (value) => parseFloat(value) > 0 // Check if the amount is greater than zero
+ )
.test(
"max",
`Distribution amount should not be greater than IO cash amount ${IODetails?.ioCash}`,
@@ -86,6 +91,7 @@ const DistributionInvestor = ({ isOpen, onClose }) => {
}
),
});
+
const investor = yup.object().shape({
amount: yup.string().required("Amount is required"),