From 80f8d051d40e69c802823a7a9991bf58ec1a4b94 Mon Sep 17 00:00:00 2001 From: Nastya Date: Sun, 1 Sep 2024 03:40:47 +0300 Subject: [PATCH] fix changepwd --- src/index.tsx | 6 +++++- src/pages/auth/RecoverPassword.tsx | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index 9e53476..ac0895d 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -125,6 +125,10 @@ const App = () => { useAfterPay() +console.log("location") +console.log(location) +console.log("window.location") +console.log(window.location) if (location.state?.redirectTo) return ( @@ -176,7 +180,7 @@ const App = () => { to="/" replace state={{ - redirectTo: `changepwd/${window.location.search}`, + redirectTo: `/changepwd${location.search}`, }} /> } diff --git a/src/pages/auth/RecoverPassword.tsx b/src/pages/auth/RecoverPassword.tsx index 77a261b..544de32 100644 --- a/src/pages/auth/RecoverPassword.tsx +++ b/src/pages/auth/RecoverPassword.tsx @@ -75,6 +75,8 @@ export default function RecoverPassword() { useEffect(() => { const params = new URLSearchParams(window.location.search); const authToken = params.get("auth"); + console.log("authToken") + console.log(authToken) setTokenUser(authToken); history.pushState(null, document.title, "/changepwd");