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,
|
signOut,
|
||||||
} = props;
|
} = props;
|
||||||
const authenticated = Boolean(email);
|
const authenticated = Boolean(email);
|
||||||
const homeButtonNavigationProps = authHeader ? { onClick: signOut } : { navigate: '/' };
|
const authHeaderAction = authenticated ? { onClick: signOut } : { navigate: '/' };
|
||||||
const closeButtonNavigationProps = authHeader ? { onClick: signOut } : { onClick: () => history.goBack() };
|
const homeButtonNavigationProps = authHeader ? authHeaderAction : { navigate: '/' };
|
||||||
|
const closeButtonNavigationProps = authHeader ? authHeaderAction : { onClick: () => history.goBack() };
|
||||||
|
|
||||||
function handleThemeToggle() {
|
function handleThemeToggle() {
|
||||||
if (automaticDarkModeEnabled) {
|
if (automaticDarkModeEnabled) {
|
||||||
|
|
Loading…
Reference in a new issue