From b580097a94668fe06ff80ff91ec2f7e9289dc593 Mon Sep 17 00:00:00 2001 From: "lokapure.girish" Date: Thu, 29 Feb 2024 17:39:19 +0530 Subject: [PATCH] lint --- .../SiteBuildHeader/step-navigation.js | 8 ++++-- .../components/SiteGenError/index.js | 1 - .../components/StateHandlers/Flow/index.js | 28 ++++++++++--------- src/OnboardingSPA/steps/TheFork/index.js | 21 ++++---------- 4 files changed, 26 insertions(+), 32 deletions(-) diff --git a/src/OnboardingSPA/components/Header/components/SiteBuildHeader/step-navigation.js b/src/OnboardingSPA/components/Header/components/SiteBuildHeader/step-navigation.js index eabe62714..940c5543e 100644 --- a/src/OnboardingSPA/components/Header/components/SiteBuildHeader/step-navigation.js +++ b/src/OnboardingSPA/components/Header/components/SiteBuildHeader/step-navigation.js @@ -136,9 +136,11 @@ const StepNavigation = () => { ) } { isLastStep ? ( diff --git a/src/OnboardingSPA/components/SiteGenError/index.js b/src/OnboardingSPA/components/SiteGenError/index.js index 99cd36188..788723f94 100644 --- a/src/OnboardingSPA/components/SiteGenError/index.js +++ b/src/OnboardingSPA/components/SiteGenError/index.js @@ -33,7 +33,6 @@ const SiteGenSiteError = () => { updateInitialize, setCurrentOnboardingData, updateSiteGenErrorStatus, - setContinueWithoutAi, } = useDispatch( nfdOnboardingStore ); useEffect( () => { diff --git a/src/OnboardingSPA/components/StateHandlers/Flow/index.js b/src/OnboardingSPA/components/StateHandlers/Flow/index.js index 6d21a54bc..88b095d70 100644 --- a/src/OnboardingSPA/components/StateHandlers/Flow/index.js +++ b/src/OnboardingSPA/components/StateHandlers/Flow/index.js @@ -17,7 +17,12 @@ import { commerce } from '../../../chapters/commerce'; import EcommerceStepLoader from '../../Loaders/Step/Ecommerce'; import SiteBuild from '../../NewfoldInterfaceSkeleton/SiteBuild'; import SiteGen from '../../NewfoldInterfaceSkeleton/SiteGen'; -import { validateFlow, removeFromAllSteps, removeFromTopSteps, removeFromRoutes } from '../../../data/flows/utils'; +import { + validateFlow, + removeFromAllSteps, + removeFromTopSteps, + removeFromRoutes, +} from '../../../data/flows/utils'; import { resolveGetDataForFlow } from '../../../data/flows'; import { stepTheFork } from '../../../steps/TheFork/step'; @@ -89,22 +94,19 @@ const FlowStateHandler = () => { const getData = resolveGetDataForFlow( DEFAULT_FLOW ); const data = getData(); - const updateAllStep = removeFromAllSteps( - data.steps, - [ stepTheFork ] - ); + const updateAllStep = removeFromAllSteps( data.steps, [ + stepTheFork, + ] ); updateAllSteps( updateAllStep.allSteps ); - const updateTopStep = removeFromTopSteps( - data?.topSteps, - [ stepTheFork ] - ); + const updateTopStep = removeFromTopSteps( data?.topSteps, [ + stepTheFork, + ] ); updateTopSteps( updateTopStep.topSteps ); - const updateRoute = removeFromRoutes( - data.routes, - [ stepTheFork ] - ); + const updateRoute = removeFromRoutes( data.routes, [ + stepTheFork, + ] ); updateRoutes( updateRoute.routes ); } }; diff --git a/src/OnboardingSPA/steps/TheFork/index.js b/src/OnboardingSPA/steps/TheFork/index.js index 62edd1f41..81dcfbc8b 100644 --- a/src/OnboardingSPA/steps/TheFork/index.js +++ b/src/OnboardingSPA/steps/TheFork/index.js @@ -10,7 +10,7 @@ import { pluginDashboardPage, } from '../../../constants'; -import { DEFAULT_FLOW, SITEGEN_FLOW } from '../../data/flows/constants'; +import { DEFAULT_FLOW } from '../../data/flows/constants'; import HeadingWithSubHeading from '../../components/HeadingWithSubHeading/SiteGen/index'; import StartOptions from '../../components/StartOptions'; import getContents from './contents'; @@ -21,20 +21,13 @@ import { trackOnboardingEvent, } from '../../utils/analytics/hiive'; import { ACTION_SITEGEN_FORK_OPTION_SELECTED } from '../../utils/analytics/hiive/constants'; -import { useNavigate } from 'react-router-dom'; const TheFork = () => { - const { migrationUrl, brandConfig, currentData } = useSelect( - ( select ) => { - return { - migrationUrl: select( nfdOnboardingStore ).getMigrationUrl(), - brandConfig: - select( nfdOnboardingStore ).getNewfoldBrandConfig(), - currentData: - select( nfdOnboardingStore ).getCurrentOnboardingData(), - }; - } - ); + const { migrationUrl } = useSelect( ( select ) => { + return { + migrationUrl: select( nfdOnboardingStore ).getMigrationUrl(), + }; + } ); const { setIsHeaderEnabled, @@ -46,8 +39,6 @@ const TheFork = () => { setHideFooterNav, } = useDispatch( nfdOnboardingStore ); - const navigate = useNavigate(); - useEffect( () => { setHideFooterNav( true ); setIsHeaderEnabled( false );