Skip to content

Commit

Permalink
chore(refactor): merge dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mperdomo-bc committed Jan 5, 2024
1 parent 8625167 commit e115797
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react'
import { FormattedMessage } from 'react-intl'
import { useDispatch } from 'react-redux'
import { push } from 'connected-react-router'
import styled from 'styled-components'

import { Badge, Button, Image, Text } from 'blockchain-info-components'
import { Wrapper } from 'components/Public'
import { isMobile, media } from 'services/styles'

import { CircleBackground } from '../../model'
import { useDispatch } from 'react-redux'
import { push } from 'connected-react-router'

const ContentWrapper = styled.div`
display: flex;
Expand Down Expand Up @@ -36,13 +36,6 @@ const AppButtons = styled.footer`
`

const ContinueOnMobile = () => {
const dispatch = useDispatch()
// Add check here to make sure that there is wallet data
// route should navigate to login if there's no wallet data
const sofiWalletRedirect = () => {
dispatch(push('/home'))
}

const APP_URL = 'https://blockchainwallet.page.link/dashboard'

const downloadMobileApp = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { useEffect } from 'react'
import { FormattedMessage } from 'react-intl'
import { useDispatch } from 'react-redux'
import { Field } from 'redux-form'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Button, Icon, Text } from 'blockchain-info-components'
import { Wrapper } from 'components/Public'
import { selectAlerts } from 'data/alerts/selectors'
import { trackEvent } from 'data/analytics/slice'
import { getIsSofi } from 'data/auth/selectors'
import { Analytics, LoginSteps } from 'data/types'
import { VERIFY_EMAIL_SENT_ERROR } from 'services/alerts'
import { media } from 'services/styles'
Expand Down Expand Up @@ -42,6 +43,7 @@ const CheckEmail = (props: Props) => {

const dispatch = useDispatch()

const isSofi = useSelector(getIsSofi)
const alerts = useSelector(selectAlerts)

const onResendEmail = (e: SyntheticEvent) => {
Expand Down Expand Up @@ -75,7 +77,7 @@ const CheckEmail = (props: Props) => {
const hasErrorAlert = alerts.find((alert) => alert.message === VERIFY_EMAIL_SENT_ERROR)

const handleBackClick = () => {
if (props.isSofi) {
if (isSofi) {
props.setStep(LoginSteps.SOFI_EMAIL)
} else {
props.handleBackArrowClickWallet()
Expand Down Expand Up @@ -154,6 +156,7 @@ const CheckEmail = (props: Props) => {

type Props = OwnProps & {
handleSubmit: (e) => void
setStep: (step: LoginSteps) => void
}

export default CheckEmail
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { FormProps, getFormValues, reduxForm } from 'redux-form'
import { getFormValues, reduxForm } from 'redux-form'

import { RemoteDataType } from '@core/types'
import Form from 'components/Form/Form'
Expand Down Expand Up @@ -129,7 +129,7 @@ const Login = (props) => {
trackEvent({
key: Analytics.LOGIN_VIEWED,
properties: {
device_origin: productAuthMetadata?.platform || 'WEB',
device_origin: productAuthMetadata?.platform ?? 'WEB',
originalTimestamp: new Date().toISOString()
}
})
Expand Down Expand Up @@ -182,7 +182,7 @@ const Login = (props) => {
return <SofiSuccess />

case LoginSteps.ENTER_EMAIL_GUID:
default:
default: {
const LoginComponent =
productAuthMetadata.product === ProductAuthOptions.EXCHANGE
? ExchangeEnterEmail
Expand All @@ -194,6 +194,7 @@ const Login = (props) => {
<LoginComponent {...loginProps} />
</>
)
}
}
})()}
</Form>
Expand Down

0 comments on commit e115797

Please sign in to comment.