Add sign-in button to mobile view when logged out

This commit is contained in:
Darius Kazemi 2023-01-03 09:39:31 -08:00
parent ae4ec996a4
commit c88d2835fb
1 changed files with 15 additions and 1 deletions

View File

@ -105,7 +105,7 @@ class ColumnHeader extends React.PureComponent {
'active': !collapsed,
});
let extraContent, pinButton, moveButtons, backButton, collapseButton;
let extraContent, pinButton, moveButtons, backButton, collapseButton, signInButton;
if (children) {
extraContent = (
@ -146,6 +146,19 @@ class ColumnHeader extends React.PureComponent {
collapsedContent.push(moveButtons);
}
if (this.context.identity.signedIn) {
signInButton = (
<>
</>
);
} else {
signInButton = (
<div class="ui__header__links">
<a href='/auth/sign_in' className='button'><FormattedMessage id='sign_in_banner.sign_in' defaultMessage='Sign in' /></a>
</div>
);
}
if (this.context.identity.signedIn && (children || (multiColumn && this.props.onPin))) {
collapseButton = (
<button
@ -180,6 +193,7 @@ class ColumnHeader extends React.PureComponent {
{hasTitle && backButton}
{extraButton}
{collapseButton}
{signInButton}
</div>
</h1>