Skip to content

Commit

Permalink
Use cache unless prompt changes
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Feb 1, 2024
1 parent 8d26263 commit fef305e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ const SiteGen = () => {
.then( ( data ) => {
if ( data.body !== null ) {
currentData.sitegen.siteGenMetaStatus.currentStatus += 1;
if (
currentData.sitegen.siteGenMetaStatus
.currentStatus ===
currentData.sitegen.siteGenMetaStatus.totalCount
) {
currentData.sitegen.skipCache = false;
}
setCurrentOnboardingData( currentData );
} else if ( retryCount < MAX_RETRIES_SITE_GEN ) {
performSiteGenMetaGeneration(
Expand Down
1 change: 1 addition & 0 deletions src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const SiteGenSiteDetails = () => {

useEffect( () => {
if (
customerInput !== undefined &&
customerInput !== '' &&
customerInput !== currentData.sitegen.siteDetails.prompt
) {
Expand Down

0 comments on commit fef305e

Please sign in to comment.