From bd7b53d1f0ef5b887af746bd22a508e4828a5291 Mon Sep 17 00:00:00 2001 From: Allen Benny Date: Wed, 6 Mar 2024 13:35:52 +0530 Subject: [PATCH 1/2] Update index.js --- .../NewfoldInterfaceSkeleton/SiteGen/index.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js b/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js index 42591ede1..c7041d2d1 100644 --- a/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js +++ b/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js @@ -137,14 +137,12 @@ const SiteGen = () => { setCurrentOnboardingData( currentData ); // Get the homepages and set that in flow - const response = await getHomepages( - currentData.sitegen.siteDetails.prompt + getHomepages( currentData.sitegen.siteDetails.prompt ).then( + ( response ) => { + currentData.sitegen.siteGenMetaStatus.currentStatus += 1; + currentData.sitegen.homepages.data = response.body; + } ); - - if ( response.body ) { - currentData.sitegen.homepages.data = response.body; - } - currentData.sitegen.siteGenMetaStatus.currentStatus += 1; } // Sync the current request changed to State setCurrentOnboardingData( currentData ); From 4f55e4357f10c3e0500520363804011e9ba31345 Mon Sep 17 00:00:00 2001 From: Allen Benny Date: Wed, 6 Mar 2024 13:40:30 +0530 Subject: [PATCH 2/2] Update index.js --- .../components/NewfoldInterfaceSkeleton/SiteGen/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js b/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js index c7041d2d1..0ec67b57f 100644 --- a/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js +++ b/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js @@ -139,8 +139,11 @@ const SiteGen = () => { // Get the homepages and set that in flow getHomepages( currentData.sitegen.siteDetails.prompt ).then( ( response ) => { + if ( response.body ) { + currentData.sitegen.homepages.data = + response.body; + } currentData.sitegen.siteGenMetaStatus.currentStatus += 1; - currentData.sitegen.homepages.data = response.body; } ); }