diff --git a/src/OnboardingSPA/components/Button/index.js b/src/OnboardingSPA/components/Button/index.js index a5efeaee4..52d5502d7 100644 --- a/src/OnboardingSPA/components/Button/index.js +++ b/src/OnboardingSPA/components/Button/index.js @@ -5,10 +5,10 @@ * @return Button */ -const Button = ( { children, onClick, disabled, className } ) => { +const Button = ( { text, handleClick, disabled, className } ) => { const handleBtnClick = () => { - if ( onClick ) { - onClick(); + if ( handleClick ) { + handleClick(); } }; @@ -19,7 +19,7 @@ const Button = ( { children, onClick, disabled, className } ) => { onClick={ handleBtnClick } disabled={ disabled } > - { children } + { text } ); }; diff --git a/src/OnboardingSPA/components/HeadingWithSubHeading/SiteGen/index.js b/src/OnboardingSPA/components/HeadingWithSubHeading/SiteGen/index.js index e0973c695..a9d22011f 100644 --- a/src/OnboardingSPA/components/HeadingWithSubHeading/SiteGen/index.js +++ b/src/OnboardingSPA/components/HeadingWithSubHeading/SiteGen/index.js @@ -12,7 +12,8 @@ import { ThemeContext } from '../../ThemeContextProvider'; */ const HeadingWithSubHeading = ( { title, subtitle } ) => { - const { theme } = useContext( ThemeContext ); + const themeContext = useContext( ThemeContext ); + const theme = themeContext?.theme || false; return (
diff --git a/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteBuild/index.js b/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteBuild/index.js index 79f4271d1..e677434e4 100644 --- a/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteBuild/index.js +++ b/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteBuild/index.js @@ -334,7 +334,9 @@ const SiteBuild = () => { if ( lastChapter !== currentChapter ) { if ( lastChapter ) { - currentData.data.chapters[ lastChapter ].completed = true; + if ( currentData.data.chapters[ lastChapter ] ) { + currentData.data.chapters[ lastChapter ].completed = true; + } trackOnboardingEvent( new OnboardingEvent( ACTION_ONBOARDING_CHAPTER_COMPLETE, @@ -344,7 +346,11 @@ const SiteBuild = () => { } if ( currentChapter ) { - currentData.data.chapters[ currentChapter ].completed = false; + if ( currentData.data.chapters[ currentChapter ] ) { + currentData.data.chapters[ + currentChapter + ].completed = false; + } trackOnboardingEvent( new OnboardingEvent( ACTION_ONBOARDING_CHAPTER_STARTED, @@ -434,28 +440,35 @@ const SiteBuild = () => { isForkStep ); - return ( - - } - drawer={ } - content={ } - sidebar={ } - footer={ isForkStep ?