11import React from 'react'
2- import { useSelector } from 'react-redux'
2+ import { useDispatch , useSelector } from 'react-redux'
33
44import styles from './returnUserExperience.module.css'
55import RuxInfo from 'src/ReturnUserExperience/RuxInfo'
@@ -13,6 +13,8 @@ import useAnalyticsEvent from 'src/hooks/useAnalyticsEvent'
1313import { __ } from 'src/utilities/Intl'
1414import { AnalyticEvents } from 'src/const/Analytics'
1515import { RootState } from 'src/redux/Store'
16+ import { ActionTypes } from 'src/redux/actions/Connect'
17+ import { selectInitialConfig } from 'src/redux/reducers/configSlice'
1618import { ClientLogo } from 'src/components/ClientLogo'
1719
1820export const RUXViews = {
@@ -26,13 +28,17 @@ export const ReturnUserExperience = React.forwardRef(() => {
2628 const [ view , setView ] = React . useState < ( typeof RUXViews ) [ keyof typeof RUXViews ] > ( RUXViews . INFO )
2729 const [ userEnteredPhone , setUserEnteredPhone ] = React . useState ( '' )
2830 const clientGuid = useSelector ( ( state : RootState ) => state . profiles . client . guid )
31+ const connectConfig = useSelector ( selectInitialConfig )
32+ const dispatch = useDispatch ( )
2933 const sendAnalyticsEvent = useAnalyticsEvent ( )
3034
3135 const handleRuxInfoContinue = ( ) => {
3236 // This is currently skipping the backend. See epic/ticket for more details.
3337 sendAnalyticsEvent ( AnalyticEvents . RUX_INFO_CONTINUE_CLICKED )
3438 setView ( RUXViews . PHONE_NUMBER )
3539 }
40+ const handleContinueWithoutPhone = ( ) =>
41+ dispatch ( { type : ActionTypes . RESET_WIDGET_MFA_STEP , payload : connectConfig } )
3642
3743 return (
3844 < div className = { styles . pageContainer } >
@@ -56,6 +62,11 @@ export const ReturnUserExperience = React.forwardRef(() => {
5662
5763 { view === RUXViews . PHONE_NUMBER && (
5864 < RuxPhoneNumber
65+ handleContinueWithoutPhone = { handleContinueWithoutPhone }
66+ handleRuxContinue = { ( ) => {
67+ // sendAnalyticsEvent(AnalyticEvents.RUX_PHONE_NUMBER_CONTINUE_CLICKED)
68+ setView ( RUXViews . OTP )
69+ } }
5970 setUserEnteredPhone = { setUserEnteredPhone }
6071 userEnteredPhone = { userEnteredPhone }
6172 />
0 commit comments