From bd7b53d1f0ef5b887af746bd22a508e4828a5291 Mon Sep 17 00:00:00 2001 From: Allen Benny Date: Wed, 6 Mar 2024 13:35:52 +0530 Subject: [PATCH] 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 );