From f5e2c72cfd0d5d416bda2e00805da6e4d47c398d Mon Sep 17 00:00:00 2001 From: Alex Efremov Date: Thu, 26 Sep 2024 17:56:06 +0700 Subject: [PATCH 1/4] Changed a redirection method on the login button click --- react/AddProductBtn.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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') { From 4527c30f4bf942cce62a4cc500c15e2b56b274b6 Mon Sep 17 00:00:00 2001 From: Alex Efremov Date: Thu, 26 Sep 2024 17:57:02 +0700 Subject: [PATCH 2/4] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) 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 From a765e4b472a8114c6f3a607822bc2c0788e625da Mon Sep 17 00:00:00 2001 From: Diego Leone Date: Thu, 26 Sep 2024 13:14:52 +0200 Subject: [PATCH 3/4] fix build --- react/MyAcccountWishlistPage.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/react/MyAcccountWishlistPage.tsx b/react/MyAcccountWishlistPage.tsx index 763d227..67b3792 100644 --- a/react/MyAcccountWishlistPage.tsx +++ b/react/MyAcccountWishlistPage.tsx @@ -6,6 +6,7 @@ type MyAccountWishlistPageProps = { children: FC title?: string namespace?: string + } const MyAccountWishlistPage = ({ children, From a00e79b4ddfa814157fd4476aabef4ccdc3ddc8a Mon Sep 17 00:00:00 2001 From: Diego Leone Date: Thu, 26 Sep 2024 13:15:10 +0200 Subject: [PATCH 4/4] fix build --- react/MyAcccountWishlistPage.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/react/MyAcccountWishlistPage.tsx b/react/MyAcccountWishlistPage.tsx index 67b3792..763d227 100644 --- a/react/MyAcccountWishlistPage.tsx +++ b/react/MyAcccountWishlistPage.tsx @@ -6,7 +6,6 @@ type MyAccountWishlistPageProps = { children: FC title?: string namespace?: string - } const MyAccountWishlistPage = ({ children,