diff --git a/src/OnboardingSPA/components/App/index.js b/src/OnboardingSPA/components/App/index.js index 57ae77843..79672dfd2 100644 --- a/src/OnboardingSPA/components/App/index.js +++ b/src/OnboardingSPA/components/App/index.js @@ -79,7 +79,7 @@ const App = () => { } async function syncStoreToDB() { - if ( currentData ){ + if ( flowData ){ if (didVisitEcommerce) { await syncStoreDetails(); } diff --git a/src/OnboardingSPA/pages/Steps/BasicInfo/index.js b/src/OnboardingSPA/pages/Steps/BasicInfo/index.js index 5c744ef30..5d4c2560b 100644 --- a/src/OnboardingSPA/pages/Steps/BasicInfo/index.js +++ b/src/OnboardingSPA/pages/Steps/BasicInfo/index.js @@ -13,18 +13,18 @@ const StepBasicInfo = () => { const { enqueueRequest, flushQueue, setIsDrawerOpened, setDrawerActiveView, setIsSidebarOpened, setIsDrawerSuppressed } = useDispatch( nfdOnboardingStore ); - const { currentStep, currentData } = useSelect( + const { currentStep, flowData } = useSelect( (select) => { return { currentStep: select(nfdOnboardingStore).getCurrentStep(), - currentData: select(nfdOnboardingStore).getCurrentOnboardingData() + flowData: select(nfdOnboardingStore).getCurrentOnboardingFlowData() }; }, [] ); useEffect( () => { - flushQueue(currentData); + flushQueue(flowData); enqueueRequest(FLOW_SYNC); enqueueRequest(SETTINGS_SYNC); if ( isLargeViewport ) { diff --git a/src/OnboardingSPA/pages/Steps/DesignThemes/index.js b/src/OnboardingSPA/pages/Steps/DesignThemes/index.js index edf258e9d..f9a340fab 100644 --- a/src/OnboardingSPA/pages/Steps/DesignThemes/index.js +++ b/src/OnboardingSPA/pages/Steps/DesignThemes/index.js @@ -9,14 +9,14 @@ const StepDesignThemes = () => { const { flushQueue, setDrawerActiveView, setIsDrawerOpened, setIsSidebarOpened } = useDispatch( nfdOnboardingStore ); - const { currentData } = useSelect((select) => { + const { flowData } = useSelect((select) => { return { - currentData: select(nfdOnboardingStore).getCurrentOnboardingData() + flowData: select(nfdOnboardingStore).getCurrentOnboardingFlowData() }; }, []); useEffect( () => { - flushQueue(currentData); + flushQueue(flowData); setIsSidebarOpened( false ); setIsDrawerOpened( true ); setDrawerActiveView( VIEW_DESIGN_THEMES ); diff --git a/src/OnboardingSPA/pages/Steps/Ecommerce/StepAddress/index.js b/src/OnboardingSPA/pages/Steps/Ecommerce/StepAddress/index.js index f8e894eab..443bcf02b 100644 --- a/src/OnboardingSPA/pages/Steps/Ecommerce/StepAddress/index.js +++ b/src/OnboardingSPA/pages/Steps/Ecommerce/StepAddress/index.js @@ -25,7 +25,7 @@ const StepAddress = () => { } = useDispatch(nfdOnboardingStore); useEffect(() => { - flushQueue(currentData); + flushQueue(flowData); if (isLargeViewport) { setIsDrawerOpened(true); } diff --git a/src/OnboardingSPA/pages/Steps/Ecommerce/StepProducts/index.js b/src/OnboardingSPA/pages/Steps/Ecommerce/StepProducts/index.js index 4cd791ee0..f7d936202 100644 --- a/src/OnboardingSPA/pages/Steps/Ecommerce/StepProducts/index.js +++ b/src/OnboardingSPA/pages/Steps/Ecommerce/StepProducts/index.js @@ -28,7 +28,7 @@ const StepProducts = () => { ); let productInfo = flowData.storeDetails.productInfo; useEffect(() => { - flushQueue(currentData); + flushQueue(flowData); if (isLargeViewport) { setIsDrawerOpened(true); } diff --git a/src/OnboardingSPA/pages/Steps/Ecommerce/StepTax/index.js b/src/OnboardingSPA/pages/Steps/Ecommerce/StepTax/index.js index 40f08845f..2de89f755 100644 --- a/src/OnboardingSPA/pages/Steps/Ecommerce/StepTax/index.js +++ b/src/OnboardingSPA/pages/Steps/Ecommerce/StepTax/index.js @@ -35,7 +35,7 @@ const StepTax = () => { ); useEffect(() => { - flushQueue(currentData); + flushQueue(flowData); if (isLargeViewport) { setIsDrawerOpened(true); } diff --git a/src/OnboardingSPA/pages/Steps/GetStarted/GetStartedExperience/index.js b/src/OnboardingSPA/pages/Steps/GetStarted/GetStartedExperience/index.js index 3be22ae90..73c298c9b 100644 --- a/src/OnboardingSPA/pages/Steps/GetStarted/GetStartedExperience/index.js +++ b/src/OnboardingSPA/pages/Steps/GetStarted/GetStartedExperience/index.js @@ -38,7 +38,7 @@ const GetStartedExperience = () => { } = useDispatch( nfdOnboardingStore ); useEffect( () => { - flushQueue(currentData); + flushQueue(flowData); enqueueRequest(FLOW_SYNC); setIsSidebarOpened( false ); setIsDrawerSuppressed( true ); diff --git a/src/OnboardingSPA/pages/Steps/GetStarted/SiteTypeSetup/PrimarySite/index.js b/src/OnboardingSPA/pages/Steps/GetStarted/SiteTypeSetup/PrimarySite/index.js index 100651621..d0bcb9ca8 100644 --- a/src/OnboardingSPA/pages/Steps/GetStarted/SiteTypeSetup/PrimarySite/index.js +++ b/src/OnboardingSPA/pages/Steps/GetStarted/SiteTypeSetup/PrimarySite/index.js @@ -30,7 +30,7 @@ const StepPrimarySetup = () => { ); useEffect(() => { - flushQueue(currentData); + flushQueue(flowData); enqueueRequest(FLOW_SYNC); setIsSidebarOpened(false); setIsDrawerSuppressed(true); diff --git a/src/OnboardingSPA/pages/Steps/GetStarted/Welcome/index.js b/src/OnboardingSPA/pages/Steps/GetStarted/Welcome/index.js index 4aaba4e1b..459f7e52f 100644 --- a/src/OnboardingSPA/pages/Steps/GetStarted/Welcome/index.js +++ b/src/OnboardingSPA/pages/Steps/GetStarted/Welcome/index.js @@ -22,11 +22,11 @@ import { VIEW_NAV_GET_STARTED } from '../../../../../constants'; */ const StepWelcome = () => { const location = useLocation(); - const { currentStep, currentData, brandName } = useSelect( + const { currentStep, flowData, brandName } = useSelect( (select) => { return { currentStep: select(nfdOnboardingStore).getCurrentStep(), - currentData: select(nfdOnboardingStore).getCurrentOnboardingData(), + flowData: select(nfdOnboardingStore).getCurrentOnboardingFlowData(), brandName: select(nfdOnboardingStore).getNewfoldBrandName(), }; }, @@ -40,7 +40,7 @@ const StepWelcome = () => { } = useDispatch( nfdOnboardingStore ); useEffect( () => { - flushQueue(currentData); + flushQueue(flowData); setIsSidebarOpened( false ); setIsDrawerSuppressed( true ); setDrawerActiveView( VIEW_NAV_GET_STARTED ); diff --git a/src/OnboardingSPA/pages/Steps/TopPriority/index.js b/src/OnboardingSPA/pages/Steps/TopPriority/index.js index 02685c947..40b9aee09 100644 --- a/src/OnboardingSPA/pages/Steps/TopPriority/index.js +++ b/src/OnboardingSPA/pages/Steps/TopPriority/index.js @@ -66,7 +66,7 @@ const StepTopPriority = ( props ) => { }; useEffect( () => { - flushQueue(currentData); + flushQueue(flowData); enqueueRequest(FLOW_SYNC); if ( isLargeViewport ) { setIsDrawerOpened( true );