diff --git a/backend/src/pages/Activate.tsx b/backend/src/pages/Activate.tsx index 13f982be..0d44e048 100644 --- a/backend/src/pages/Activate.tsx +++ b/backend/src/pages/Activate.tsx @@ -119,7 +119,9 @@ const Activate = () => { } const onLoad = async (user?: bookcarsTypes.User) => { - if (!user) { + if (user) { + setNoMatch(true) + } else { const params = new URLSearchParams(window.location.search) if (params.has('u') && params.has('e') && params.has('t')) { const _userId = params.get('u') diff --git a/backend/src/pages/ResetPassword.tsx b/backend/src/pages/ResetPassword.tsx index af41d274..1d589b90 100644 --- a/backend/src/pages/ResetPassword.tsx +++ b/backend/src/pages/ResetPassword.tsx @@ -104,7 +104,9 @@ const ResetPassword = () => { } const onLoad = async (user?: bookcarsTypes.User) => { - if (!user) { + if (user) { + setNoMatch(true) + } else { const params = new URLSearchParams(window.location.search) if (params.has('u') && params.has('e') && params.has('t')) { const _userId = params.get('u') diff --git a/frontend/src/pages/Activate.tsx b/frontend/src/pages/Activate.tsx index c6e3b558..07574e33 100644 --- a/frontend/src/pages/Activate.tsx +++ b/frontend/src/pages/Activate.tsx @@ -121,7 +121,9 @@ const Activate = () => { } const onLoad = async (user?: bookcarsTypes.User) => { - if (!user) { + if (user) { + setNoMatch(true) + } else { const params = new URLSearchParams(window.location.search) if (params.has('u') && params.has('e') && params.has('t')) { const _userId = params.get('u') diff --git a/frontend/src/pages/ResetPassword.tsx b/frontend/src/pages/ResetPassword.tsx index a7de6d51..65aa3e5f 100644 --- a/frontend/src/pages/ResetPassword.tsx +++ b/frontend/src/pages/ResetPassword.tsx @@ -106,7 +106,9 @@ const ResetPassword = () => { } const onLoad = async (user?: bookcarsTypes.User) => { - if (!user) { + if (user) { + setNoMatch(true) + } else { const params = new URLSearchParams(window.location.search) if (params.has('u') && params.has('e') && params.has('t')) { const _userId = params.get('u')