don't signout users that are already signed out

This commit is contained in:
Sean Yesmunt 2019-10-29 15:30:49 -04:00
parent 98ce02508c
commit e650b83385

View file

@ -41,8 +41,9 @@ const Header = (props: Props) => {
signOut,
} = props;
const authenticated = Boolean(email);
const homeButtonNavigationProps = authHeader ? { onClick: signOut } : { navigate: '/' };
const closeButtonNavigationProps = authHeader ? { onClick: signOut } : { onClick: () => history.goBack() };
const authHeaderAction = authenticated ? { onClick: signOut } : { navigate: '/' };
const homeButtonNavigationProps = authHeader ? authHeaderAction : { navigate: '/' };
const closeButtonNavigationProps = authHeader ? authHeaderAction : { onClick: () => history.goBack() };
function handleThemeToggle() {
if (automaticDarkModeEnabled) {