don't signout users that are already signed out
This commit is contained in:
parent
98ce02508c
commit
e650b83385
1 changed files with 3 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue