Skip to content

Commit

Permalink
add loader
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Sep 28, 2023
1 parent 5695d2d commit 9bff418
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/OnboardingSPA/components/StateHandlers/Flow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ const FlowStateHandler = ( { children } ) => {
updateDesignRoutes,
setCurrentOnboardingData,
setActiveChapter,
setIsDrawerOpened,
setIsDrawerSuppressed,
setIsHeaderNavigationEnabled,
setSidebarActiveView,
} = useDispatch( nfdOnboardingStore );

const handleCommerceFlow = async ( flow, retries = 0 ) => {
Expand Down Expand Up @@ -176,9 +180,18 @@ const FlowStateHandler = ( { children } ) => {
trackChapters();
}, [ currentStep ] );

Check warning on line 181 in src/OnboardingSPA/components/StateHandlers/Flow/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

React Hook useEffect has a missing dependency: 'trackChapters'. Either include it or remove the dependency array

Check warning on line 181 in src/OnboardingSPA/components/StateHandlers/Flow/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

React Hook useEffect has a missing dependency: 'trackChapters'. Either include it or remove the dependency array

const disableNavigation = () => {
setIsDrawerOpened( false );
setIsDrawerSuppressed( true );
setIsHeaderNavigationEnabled( false );
setSidebarActiveView( false );
};

useEffect( () => {
if ( window.nfdOnboarding?.newFlow ) {
const flow = window.nfdOnboarding.newFlow;
disableNavigation();
setNewFlow( flow );
switchToNewFlow( flow );
window.nfdOnboarding.newFlow = undefined;
}
Expand Down

0 comments on commit 9bff418

Please sign in to comment.