From 3f1ea43bd8a8a81c071fc7aaa814df95abafaa70 Mon Sep 17 00:00:00 2001 From: "lokapure.girish" Date: Wed, 6 Mar 2024 13:56:39 +0530 Subject: [PATCH] Removed error state from fork and welcome step --- .../NewfoldInterfaceSkeleton/SiteGen/index.js | 4 +- .../steps/SiteGen/Welcome/index.js | 51 ++++++----- src/OnboardingSPA/steps/TheFork/index.js | 85 +++++++++---------- 3 files changed, 68 insertions(+), 72 deletions(-) diff --git a/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js b/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js index 42591ede1..71e11356a 100644 --- a/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js +++ b/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js @@ -36,6 +36,7 @@ import { ACTION_ONBOARDING_CHAPTER_STARTED, } from '../../../utils/analytics/hiive/constants'; import { SITEGEN_FLOW } from '../../../data/flows/constants'; +import { stepTheFork } from '../../../steps/TheFork/step'; // Wrapping the NewfoldInterfaceSkeleton with the HOC to make theme available const ThemedNewfoldInterfaceSkeleton = themeToggleHOC( @@ -93,7 +94,8 @@ const SiteGen = () => { const prevSiteGenErrorStatus = useRef(); async function syncStoreToDB() { - if ( currentData ) { + // The First Fork Step doesn't have any Store changes + if ( currentData && location?.pathname !== stepTheFork.path ) { //Set the Flow Data and sync store and DB const result = await setFlow( currentData ); if ( result?.error !== null ) { diff --git a/src/OnboardingSPA/steps/SiteGen/Welcome/index.js b/src/OnboardingSPA/steps/SiteGen/Welcome/index.js index 97734f99d..ed9681339 100644 --- a/src/OnboardingSPA/steps/SiteGen/Welcome/index.js +++ b/src/OnboardingSPA/steps/SiteGen/Welcome/index.js @@ -7,7 +7,6 @@ import { store as nfdOnboardingStore } from '../../../store'; import { HEADER_SITEGEN } from '../../../../constants'; import getContents from './contents'; import OrbAnimation from '../../../components/OrbAnimation'; -import SitegenAiStateHandler from '../../../components/StateHandlers/SitegenAi'; const SiteGenWelcome = () => { const { @@ -30,33 +29,31 @@ const SiteGenWelcome = () => { const content = getContents(); return ( - - -
-
- -
-
-
-

- { content.heading } -

-
-
-

- { content.subHeading } -

-
- + +
+
+
- - +
+
+

+ { content.heading } +

+
+
+

+ { content.subHeading } +

+
+ +
+
); }; diff --git a/src/OnboardingSPA/steps/TheFork/index.js b/src/OnboardingSPA/steps/TheFork/index.js index 81dcfbc8b..1bb4cf42b 100644 --- a/src/OnboardingSPA/steps/TheFork/index.js +++ b/src/OnboardingSPA/steps/TheFork/index.js @@ -14,7 +14,6 @@ import { DEFAULT_FLOW } from '../../data/flows/constants'; import HeadingWithSubHeading from '../../components/HeadingWithSubHeading/SiteGen/index'; import StartOptions from '../../components/StartOptions'; import getContents from './contents'; -import SitegenAiStateHandler from '../../components/StateHandlers/SitegenAi'; import { OnboardingEvent, sendOnboardingEvent, @@ -65,51 +64,49 @@ const TheFork = () => { }; const content = getContents(); return ( - - - - -
-
- { migrationUrl && ( - - trackOnboardingEvent( - new OnboardingEvent( - ACTION_SITEGEN_FORK_OPTION_SELECTED, - 'MIGRATE' - ) + + + +
+
+ { migrationUrl && ( +
+ trackOnboardingEvent( + new OnboardingEvent( + ACTION_SITEGEN_FORK_OPTION_SELECTED, + 'MIGRATE' ) - } - > - { content.importtext } - - ) } - handleForkExit() } - onKeyDown={ () => handleForkExit() } + ) + } > - { content.exitToWordPress } - -
-
+ { content.importtext } + + ) } + handleForkExit() } + onKeyDown={ () => handleForkExit() } + > + { content.exitToWordPress } + + ); };