File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
packages/blockchain-wallet-v4-frontend/src/scenes/Refer/Sofi Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 1- import React from 'react'
2- import { Redirect , RouteComponentProps } from 'react-router-dom'
1+ import React , { useEffect } from 'react'
2+ import { RouteComponentProps } from 'react-router-dom'
33
44const SofiReferralComponent : React . FC < RouteComponentProps > = ( { location } ) => {
5- const searchParams = new URLSearchParams ( location . search )
6- const viewParam = searchParams . get ( 'buy' )
7- const queryString = viewParam ? `?code= ${ viewParam } ` : '?ref=sofi'
8- const redirectTo = `https://blockchainwallet.page.link/buysofi ${ queryString } `
5+ useEffect ( ( ) => {
6+ const searchParams = new URLSearchParams ( location . search )
7+ const viewParam = searchParams . get ( 'buy' )
8+ const queryString = viewParam ? `?code= ${ viewParam } ` : '?ref=sofi'
99
10- return < Redirect to = { redirectTo } />
10+ window . location . href = `https://blockchainwallet.page.link/buysofi${ queryString } `
11+ } , [ location ] )
12+
13+ return null
1114}
1215
1316export default SofiReferralComponent
You can’t perform that action at this time.
0 commit comments