From fba6a7ad4517c7c7c5414ba302038f000a457892 Mon Sep 17 00:00:00 2001 From: Swapnil Bendal <84583651+Swapnil155@users.noreply.github.com> Date: Fri, 17 Jan 2025 19:08:29 +0530 Subject: [PATCH] Refactor validation schema by renaming 'comments' to 'comment' in InitiateReversalPopup component --- src/Components/Popups/InitiateReversalPopups.jsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Components/Popups/InitiateReversalPopups.jsx b/src/Components/Popups/InitiateReversalPopups.jsx index c9c9810..4d54734 100644 --- a/src/Components/Popups/InitiateReversalPopups.jsx +++ b/src/Components/Popups/InitiateReversalPopups.jsx @@ -46,8 +46,6 @@ const InitiateReversalPopup = ({ mode: "all", }); - console.log(isLoading); - return ( @@ -59,7 +57,7 @@ const InitiateReversalPopup = ({ onSubmit={handleSubmit((data) => { handelApproved(data); reset(); - onClose() + onClose(); })} > @@ -69,24 +67,24 @@ const InitiateReversalPopup = ({ rows={6} focusBorderColor="green.400" name="fileName" - {...register("comments")} + {...register("comment")} fontSize="sm" type="textarea" size="md" - placeholder={"Enter your comments...."} + placeholder={"Enter your comment...."} rounded={"md"} resize={"none"} mb={2} /> - {errors.comments ? ( + {errors.comment ? ( - {errors.comments.message} + {errors.comment.message} ) : ( Maximum length should be 150 characters. You have entered{" "} - {watch()?.comments?.length || 0} characters. + {watch()?.comment?.length || 0} characters. )}