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,8 +28,13 @@ 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
35+ const handleContinueWithoutPhone = ( ) =>
36+ dispatch ( { type : ActionTypes . RESET_WIDGET_MFA_STEP , payload : connectConfig } )
37+
3138 return (
3239 < div className = { styles . pageContainer } >
3340 { view !== RUXViews . LIST && (
@@ -57,6 +64,11 @@ export const ReturnUserExperience = React.forwardRef(() => {
5764
5865 { view === RUXViews . PHONE_NUMBER && (
5966 < RuxPhoneNumber
67+ handleContinueWithoutPhone = { handleContinueWithoutPhone }
68+ handleRuxContinue = { ( ) => {
69+ // sendAnalyticsEvent(AnalyticEvents.RUX_PHONE_NUMBER_CONTINUE_CLICKED)
70+ setView ( RUXViews . OTP )
71+ } }
6072 setUserEnteredPhone = { setUserEnteredPhone }
6173 userEnteredPhone = { userEnteredPhone }
6274 />
0 commit comments