Skip to content

Commit 10a22c3

Browse files
committed
cleanup
1 parent 272405a commit 10a22c3

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

packages/template-retail-react-app/app/pages/checkout/partials/contact-info.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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

5453
const ContactInfo = ({isSocialEnabled = false, isPasswordlessEnabled = false, idps = []}) => {
5554
const {formatMessage} = useIntl()

packages/template-retail-react-app/app/pages/login/index.jsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,7 @@ import {
3737
USER_NOT_FOUND_ERROR
3838
} from '@salesforce/retail-react-app/app/constants'
3939
import {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'
4641
import {getConfig} from '@salesforce/pwa-kit-runtime/utils/ssr-config'
4742

4843
const 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 {

0 commit comments

Comments
 (0)