From a025ac34d7772ac91a84ac3e88abbbcdd9261466 Mon Sep 17 00:00:00 2001 From: "pramod.mahajan" Date: Fri, 31 Oct 2025 10:07:01 +0530 Subject: [PATCH] added default "Select Organization Size" option and improve select safety with optional chaining --- .../UserSubscription/SubscriptionForm.jsx | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/components/UserSubscription/SubscriptionForm.jsx b/src/components/UserSubscription/SubscriptionForm.jsx index bada7426..8b5c1607 100644 --- a/src/components/UserSubscription/SubscriptionForm.jsx +++ b/src/components/UserSubscription/SubscriptionForm.jsx @@ -159,6 +159,7 @@ const SubscriptionForm = ({ currentStep, setCurrentStep, setStepStatus }) => { + + {errors.organizationSize && (
{errors.organizationSize.message} @@ -193,13 +196,17 @@ const SubscriptionForm = ({ currentStep, setCurrentStep, setStepStatus }) => { {industryLoading ? ( ) : ( - data?.map((indu) => ( - - )) + <> + + {data?.map((indu) => ( + + ))} + )} + {errors.industryId && (
{errors.industryId.message} @@ -217,6 +224,7 @@ const SubscriptionForm = ({ currentStep, setCurrentStep, setStepStatus }) => { className="form-select shadow-none border py-1 px-2 small" {...register("reference")} > + {reference.map((org) => (