diff --git a/CHANGELOG.md b/CHANGELOG.md index 568334c..b26ee47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Fix + +- change redirection method of the login button click event + ## [1.18.3] - 2024-09-17 ### Fix diff --git a/react/AddProductBtn.tsx b/react/AddProductBtn.tsx index a1a216a..c2f8691 100644 --- a/react/AddProductBtn.tsx +++ b/react/AddProductBtn.tsx @@ -171,13 +171,11 @@ const AddBtn: FC = ({ toastURL = '/account/#wishlist' }) => { action = { label: intl.formatMessage(messages.login), onClick: () => - navigate({ - page: 'store.login', - query: `returnUrl=${encodeURIComponent( + window.location.assign(`/login?returnUrl=${encodeURIComponent( String(history?.location?.pathname) + String(history?.location?.search) )}`, - }), + ), } } if (messsageKey === 'productAddedToList') {