File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed
packages/template-retail-react-app/app/pages Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ import {
4949 PASSWORDLESS_ERROR_MESSAGES ,
5050 USER_NOT_FOUND_ERROR
5151} from '@salesforce/retail-react-app/app/constants'
52- import { setSessionJSONItem } from '@salesforce/retail-react-app/app/utils/utils'
5352
5453const ContactInfo = ( { isSocialEnabled = false , isPasswordlessEnabled = false , idps = [ ] } ) => {
5554 const { formatMessage} = useIntl ( )
Original file line number Diff line number Diff line change @@ -37,12 +37,7 @@ import {
3737 USER_NOT_FOUND_ERROR
3838} from '@salesforce/retail-react-app/app/constants'
3939import { usePrevious } from '@salesforce/retail-react-app/app/hooks/use-previous'
40- import {
41- isServer ,
42- getSessionJSONItem ,
43- setSessionJSONItem ,
44- clearSessionJSONItem
45- } from '@salesforce/retail-react-app/app/utils/utils'
40+ import { isServer } from '@salesforce/retail-react-app/app/utils/utils'
4641import { getConfig } from '@salesforce/pwa-kit-runtime/utils/ssr-config'
4742
4843const LOGIN_ERROR_MESSAGE = defineMessage ( {
@@ -158,8 +153,6 @@ const Login = ({initialView = LOGIN_VIEW}) => {
158153 useEffect ( ( ) => {
159154 if ( path === PASSWORDLESS_LOGIN_LANDING_PATH && isSuccessCustomerBaskets ) {
160155 const token = queryParams . get ( 'token' )
161- locatedFrom = window . localStorage . getItem ( 'returnToPage' )
162- window . localStorage . removeItem ( 'returnToPage' )
163156
164157 const passwordlessLogin = async ( ) => {
165158 try {
@@ -180,6 +173,7 @@ const Login = ({initialView = LOGIN_VIEW}) => {
180173 useEffect ( ( ) => {
181174 if ( isRegistered ) {
182175 handleMergeBasket ( )
176+ locatedFrom = window . localStorage . getItem ( 'returnToPage' )
183177 if ( locatedFrom ) {
184178 navigate ( locatedFrom )
185179 } else {
You can’t perform that action at this time.
0 commit comments