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 (