Skip to content

Commit

Permalink
EPMRPP-89865 || UI crashes on the demo instance if GitHub authenticat…
Browse files Browse the repository at this point in the history
…ion has not been set up (#3781)
  • Loading branch information
Vadim73i authored Mar 28, 2024
1 parent 8b77cb5 commit d53e238
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions app/src/layouts/appLayout/demoBanner/demoBanner.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,22 @@ export class DemoBanner extends Component {
return formatMessage(messages.descriptionGithub);
}

const href = normalizePathWithPrefix(this.getAuthPath());
const githubPath = this.getAuthPath();

return (
<Fragment>
{formatMessage(messages.descriptionDefault)}
<a className={cx('github-login')} href={href} onClick={this.loginWithGitHub}>
{formatMessage(messages.githubAuthTitle)}
</a>
{githubPath ? (
<a
className={cx('github-login')}
href={normalizePathWithPrefix(githubPath)}
onClick={this.loginWithGitHub}
>
{formatMessage(messages.githubAuthTitle)}
</a>
) : (
formatMessage(messages.githubAuthTitle)
)}
</Fragment>
);
};
Expand Down

0 comments on commit d53e238

Please sign in to comment.