mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 09:38:10 -03:30
add TowerLogo tests
This commit is contained in:
@@ -13,13 +13,13 @@ class TowerLogo extends Component {
|
||||
}
|
||||
|
||||
onClick = () => {
|
||||
if (!this.props.onClick) return;
|
||||
const { history, onClick: handleClick } = this.props;
|
||||
|
||||
const { history } = this.props;
|
||||
if (!handleClick) return;
|
||||
|
||||
history.push('/');
|
||||
|
||||
this.props.onClick();
|
||||
handleClick();
|
||||
};
|
||||
|
||||
onHover = () => {
|
||||
@@ -30,10 +30,11 @@ class TowerLogo extends Component {
|
||||
|
||||
render () {
|
||||
const { hover } = this.state;
|
||||
const { onClick: handleClick } = this.props;
|
||||
|
||||
let src = TowerLogoHeader;
|
||||
|
||||
if (hover && this.props.onClick) {
|
||||
if (hover && handleClick) {
|
||||
src = TowerLogoHeaderHover;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user