Skip to content

Commit

Permalink
Merge pull request #585 from newfold-labs/enhance/add-min-char-threshold
Browse files Browse the repository at this point in the history
Add Min Char Threshold Site Details
  • Loading branch information
arunshenoy99 authored Jun 27, 2024
2 parents 619933c + f19db01 commit c41b076
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,18 @@ const SiteGenSiteDetails = () => {
setIsHeaderNavigationEnabled( true );
setDrawerActiveView( false );
if ( currentData.sitegen.siteDetails?.prompt !== '' ) {
setIsValidInput( true );
setIsFooterNavAllowed( true );
if (
currentData.sitegen.siteDetails?.prompt.length <
currentData.sitegen.siteDetails?.minCharLimit
) {
setIsValidInput( false );
setIsFooterNavAllowed( false );
currentData.sitegen.siteDetails.prompt = '';
setCurrentOnboardingData( currentData );
} else {
setIsValidInput( true );
setIsFooterNavAllowed( true );
}
return setCustomerInput( currentData.sitegen.siteDetails.prompt );
}
setIsFooterNavAllowed( false );
Expand Down

0 comments on commit c41b076

Please sign in to comment.