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