diff --git a/src/Components/Banner/BannerEdit.jsx b/src/Components/Banner/BannerEdit.jsx index 40af0c7..5bf8dec 100644 --- a/src/Components/Banner/BannerEdit.jsx +++ b/src/Components/Banner/BannerEdit.jsx @@ -268,18 +268,18 @@ const BannerEdit = ({isLoading, data, updateBanner, navigateTo, refetch, center} type="text" id="heading" errorBorderColor="crimson" - isInvalid={formData?.heading.length > 50} + isInvalid={formData?.heading?.length > 50} // maxLength={51} /> 50 + formData?.heading?.length > 50 ? "red" : "gray.500" } className="web-text-small" > - If heading crosses 50 characters it will cause problem in alignment on website.you have entered {formData?.heading.length} characters + If heading crosses 50 characters it will cause problem in alignment on website.you have entered {formData?.heading?.length} characters {errors.name && ( @@ -301,18 +301,18 @@ const BannerEdit = ({isLoading, data, updateBanner, navigateTo, refetch, center} id="sub_heading" name="sub_heading" errorBorderColor="crimson" - isInvalid={formData?.sub_heading.length > 230} + isInvalid={formData?.sub_heading?.length > 230} /> 230 + formData?.sub_heading?.length > 230 ? "red" : "gray.500" } className="web-text-small" > - If sub heading crosses 50 characters it will cause problem in alignment on website.you have entered {formData?.sub_heading.length} characters + If sub heading crosses 50 characters it will cause problem in alignment on website.you have entered {formData?.sub_heading?.length} characters {errors.sub_heading && ( @@ -335,17 +335,17 @@ const BannerEdit = ({isLoading, data, updateBanner, navigateTo, refetch, center} id="CTO_button_title" name="CTO_button_title" errorBorderColor="crimson" - isInvalid={formData?.CTO_button_title.length > 30} + isInvalid={formData?.CTO_button_title?.length > 30} /> 30 + formData?.CTO_button_title?.length > 30 ? "red" : "gray.500" } className="web-text-small" > - If sub heading crosses 50 characters it will cause problem in alignment on website.you have entered {formData?.CTO_button_title.length} characters + If sub heading crosses 50 characters it will cause problem in alignment on website.you have entered {formData?.CTO_button_title?.length} characters {errors.CTO_button_title && (