From d434e6267391d2ca7c53e2f0677ca4262fae349f Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Wed, 26 Aug 2020 23:16:47 -0400 Subject: [PATCH] ensure close button always does something on authPage --- ui/component/header/view.jsx | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/ui/component/header/view.jsx b/ui/component/header/view.jsx index bd35b553b..0943a7a62 100644 --- a/ui/component/header/view.jsx +++ b/ui/component/header/view.jsx @@ -100,23 +100,19 @@ const Header = (props: Props) => { clearEmailEntry(); clearPasswordEntry(); - if (isSignInPage && !emailToVerify) { - history.goBack(); - } - - if (isSignUpPage) { - history.goBack(); - } - - if (isPwdResetPage) { - history.goBack(); - } - if (syncError) { signOut(); } - history.push('/'); + if (isSignInPage && !emailToVerify) { + history.goBack(); + } else if (isSignUpPage) { + history.goBack(); + } else if (isPwdResetPage) { + history.goBack(); + } else { + history.push('/'); + } }, };