Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
girish-lokapure committed Feb 27, 2024
1 parent 2f3f450 commit fb9de19
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/OnboardingSPA/steps/TheFork/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ const TheFork = () => {
setCurrentOnboardingData,
} = useDispatch( nfdOnboardingStore );

const navigate = useNavigate();

useEffect( () => {
checkHasAiAccess();
setHideFooterNav( true );
setIsHeaderEnabled( false );
setSidebarActiveView( false );
Expand All @@ -57,8 +60,8 @@ const TheFork = () => {
setDrawerActiveView( false );
setFooterActiveView( FOOTER_SITEGEN );
} );
const navigate = useNavigate();
useEffect( () => {

const checkHasAiAccess = () => {
if ( false === validateFlow( brandConfig, SITEGEN_FLOW ) ) {
const currentFlow = window.nfdOnboarding.currentFlow;
const getData = resolveGetDataForFlow( DEFAULT_FLOW );
Expand All @@ -76,8 +79,7 @@ const TheFork = () => {
updateInitialize( true );
navigate( data.steps[ 1 ].path );
}
} );

};
const oldFlow = window.nfdOnboarding?.oldFlow
? window.nfdOnboarding.oldFlow
: DEFAULT_FLOW;
Expand Down

0 comments on commit fb9de19

Please sign in to comment.