1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-19 04:51:13 +02:00

fix items pane and logout/login btn

This commit is contained in:
Kushagra Gour
2019-07-17 11:30:39 +05:30
parent 455babbf19
commit 6ffb623ece
3 changed files with 61 additions and 51 deletions

View File

@@ -95,30 +95,33 @@ export function MainHeader(props) {
</svg>
<Trans>Open</Trans>
</button>
<Button
onClick={props.loginBtnHandler}
data-event-category="ui"
data-event-action="loginButtonClick"
class="hide-on-login btn btn--dark hint--rounded hint--bottom-left"
>
<Trans>Login/Signup</Trans>
</Button>
<Button
onClick={props.profileBtnHandler}
data-event-category="ui"
data-event-action="headerAvatarClick"
aria-label={i18n._(t`See profile or Logout`)}
class="hide-on-logout btn--dark hint--rounded hint--bottom-left"
>
<img
id="headerAvatarImg"
width="20"
src={
props.user ? props.user.photoURL || DEFAULT_PROFILE_IMG : ''
}
class="main-header__avatar-img"
/>
</Button>
{!props.user ? (
<Button
onClick={props.loginBtnHandler}
data-event-category="ui"
data-event-action="loginButtonClick"
class="btn btn--dark hint--rounded hint--bottom-left"
>
<Trans>Login/Signup</Trans>
</Button>
) : (
<Button
onClick={props.profileBtnHandler}
data-event-category="ui"
data-event-action="headerAvatarClick"
aria-label={i18n._(t`See profile or Logout`)}
class="btn--dark hint--rounded hint--bottom-left"
>
<img
id="headerAvatarImg"
width="20"
src={
props.user ? props.user.photoURL || DEFAULT_PROFILE_IMG : ''
}
class="main-header__avatar-img"
/>
</Button>
)}
</div>
</div>
)}