diff --git a/src/OnboardingSPA/components/Header/components/SiteGenHeader/step-navigation.js b/src/OnboardingSPA/components/Header/components/SiteGenHeader/step-navigation.js index b66548465..fc74b3624 100644 --- a/src/OnboardingSPA/components/Header/components/SiteGenHeader/step-navigation.js +++ b/src/OnboardingSPA/components/Header/components/SiteGenHeader/step-navigation.js @@ -5,6 +5,8 @@ import { __ } from '@wordpress/i18n'; import { store as nfdOnboardingStore } from '../../../../store'; import ButtonDark from '../../../Button/ButtonDark'; +import { stepSiteGenPreview } from '../../../../steps/SiteGen/Preview/step'; +import { stepSiteGenSiteLogo } from '../../../../steps/SiteGen/SiteLogo/step'; /** * Back step Navigation button. @@ -37,18 +39,28 @@ const Back = ( { path, showErrorDialog } ) => { * @return {WPComponent} StepNavigation Component */ const StepNavigation = () => { - const { previousStep, showErrorDialog } = useSelect( ( select ) => { - return { - previousStep: select( nfdOnboardingStore ).getPreviousStep(), - showErrorDialog: select( nfdOnboardingStore ).getShowErrorDialog(), - }; - }, [] ); + const { previousStep, currentStep, showErrorDialog } = useSelect( + ( select ) => { + return { + previousStep: select( nfdOnboardingStore ).getPreviousStep(), + currentStep: select( nfdOnboardingStore ).getCurrentStep(), + showErrorDialog: + select( nfdOnboardingStore ).getShowErrorDialog(), + }; + }, + [] + ); const isFirstStep = null === previousStep || false === previousStep; + const isPreviewStep = currentStep.path === stepSiteGenPreview.path; return (
{ isFirstStep ? null : ( ) } diff --git a/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js b/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js index 8b0b3f8c1..74f059d87 100644 --- a/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js +++ b/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js @@ -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( diff --git a/src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js b/src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js index cbf730246..83a2f043c 100644 --- a/src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js +++ b/src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js @@ -49,6 +49,7 @@ const SiteGenSiteDetails = () => { useEffect( () => { if ( + customerInput !== undefined && customerInput !== '' && customerInput !== currentData.sitegen.siteDetails.prompt ) {