From 7eaa21fc1e0cb53b97a1dfcf3e8dc9521c858e46 Mon Sep 17 00:00:00 2001 From: Timur Ercan Date: Thu, 9 Mar 2023 13:14:11 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/components/login.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/apps/web/components/login.tsx b/apps/web/components/login.tsx index 68a5acd60..8f4e612c1 100644 --- a/apps/web/components/login.tsx +++ b/apps/web/components/login.tsx @@ -30,8 +30,6 @@ export default function Login() { // If not absolute URL, make it absolute if (!/^https?:\/\//.test(callbackUrl)) { - if (process.env.NODE_ENV !== "production") { - } callbackUrl = `${NEXT_PUBLIC_WEBAPP_URL}/${callbackUrl}`; } @@ -58,12 +56,10 @@ export default function Login() { setErrorMessage("Error"); toast.dismiss(); toast.error("Something went wrong."); - } - else if (!res.error) { + } else if (!res.error) { // we're logged in, let's do a hard refresh to the original url router.push(callbackUrl); - } - else { + } else { toast.dismiss(); if (res.status == 401) { toast.error("Invalid email or password.");