Skip to content

Commit

Permalink
Some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
daledupreez committed May 23, 2024
1 parent ec61ec4 commit fb8993c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/landing/stepper/declarative-flow/internals/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import React, { useEffect, useCallback, useMemo, Suspense, lazy } from 'react';
import Modal from 'react-modal';
import { Navigate, Route, Routes, generatePath, useNavigate, useLocation } from 'react-router-dom';
import DocumentHead from 'calypso/components/data/document-head';
import { recordSubmitStep } from 'calypso/landing/stepper/declarative-flow/internals/analytics/record-submit-step';
import { STEPS } from 'calypso/landing/stepper/declarative-flow/internals/steps';
import { STEPPER_INTERNAL_STORE } from 'calypso/landing/stepper/stores';
import { recordPageView } from 'calypso/lib/analytics/page-view';
Expand Down Expand Up @@ -102,6 +103,7 @@ const useStepNavigationWithLogin = (
return {
...stepNavigation,
submit: () => {
recordSubmitStep( {}, '', flow.name, currentStepRoute, flow.variantSlug );
return stepNavigate( nextStep );
},
};
Expand Down Expand Up @@ -349,7 +351,7 @@ export const FlowRenderer: React.FC< { flow: Flow } > = ( { flow } ) => {
{ flowSteps.map( ( step ) => (
<Route
key={ step.slug }
path={ `/${ flow.variantSlug ?? flow.name }/${ step.slug }` }
path={ `/${ flowPath }/${ step.slug }` }
element={
<StepRoute
step={ step }
Expand All @@ -364,9 +366,7 @@ export const FlowRenderer: React.FC< { flow: Flow } > = ( { flow } ) => {
path="*"
element={
<Navigate
to={ `/${ flow.variantSlug ?? flow.name }/${ stepPaths[ 0 ] }${
window.location.search
}` }
to={ `/${ flowPath }/${ stepPaths[ 0 ] }${ window.location.search }` }
replace
/>
}
Expand Down

0 comments on commit fb8993c

Please sign in to comment.