Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
girish-lokapure committed Feb 29, 2024
1 parent 2f59264 commit b580097
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,11 @@ const StepNavigation = () => {
<Back
path={ previousStep.path }
showErrorDialog={ showErrorDialog }
disabled={ currentStep === stepWelcome
? currentData.continueWithoutAi
: false }
disabled={
currentStep === stepWelcome
? currentData.continueWithoutAi
: false
}
/>
) }
{ isLastStep ? (
Expand Down
1 change: 0 additions & 1 deletion src/OnboardingSPA/components/SiteGenError/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const SiteGenSiteError = () => {
updateInitialize,
setCurrentOnboardingData,
updateSiteGenErrorStatus,
setContinueWithoutAi,
} = useDispatch( nfdOnboardingStore );

useEffect( () => {
Expand Down
28 changes: 15 additions & 13 deletions src/OnboardingSPA/components/StateHandlers/Flow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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 );
}
};
Expand Down
21 changes: 6 additions & 15 deletions src/OnboardingSPA/steps/TheFork/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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,
Expand All @@ -46,8 +39,6 @@ const TheFork = () => {
setHideFooterNav,
} = useDispatch( nfdOnboardingStore );

const navigate = useNavigate();

useEffect( () => {
setHideFooterNav( true );
setIsHeaderEnabled( false );
Expand Down

0 comments on commit b580097

Please sign in to comment.