diff --git a/backend/src/pages/Activate.tsx b/backend/src/pages/Activate.tsx index cc4f7ad2..563f3e36 100644 --- a/backend/src/pages/Activate.tsx +++ b/backend/src/pages/Activate.tsx @@ -119,7 +119,9 @@ const Activate = () => { } const onLoad = async (user?: movininTypes.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 d50645d4..c54f2a67 100644 --- a/backend/src/pages/ResetPassword.tsx +++ b/backend/src/pages/ResetPassword.tsx @@ -104,7 +104,9 @@ const ResetPassword = () => { } const onLoad = async (user?: movininTypes.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 e2ea3131..a8539fe0 100644 --- a/frontend/src/pages/Activate.tsx +++ b/frontend/src/pages/Activate.tsx @@ -121,7 +121,9 @@ const Activate = () => { } const onLoad = async (user?: movininTypes.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 7364c72f..847314ba 100644 --- a/frontend/src/pages/ResetPassword.tsx +++ b/frontend/src/pages/ResetPassword.tsx @@ -106,7 +106,9 @@ const ResetPassword = () => { } const onLoad = async (user?: movininTypes.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')