Skip to content

Commit

Permalink
Rewind: fix help link in credentials form footer (Automattic#21860)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliorivero authored Jan 26, 2018
1 parent 6ee500f commit c5a04fe
Showing 1 changed file with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class SetupFooter extends Component {
hidePopover = () => this.setState( { isPopoverVisible: false } );

render() {
const { happychatAvailable, translate } = this.props;
const { happychatIsAvailable, translate } = this.props;
const { isPopoverVisible, popoverContext } = this.state;

return (
Expand Down Expand Up @@ -61,7 +61,7 @@ class SetupFooter extends Component {
}
</Popover>

{ happychatAvailable && (
{ happychatIsAvailable && (
<HappychatButton
onClick={ this.props.happychatEvent }
>
Expand All @@ -76,12 +76,11 @@ class SetupFooter extends Component {
}
}

const mapStateToProps = state => ( {
isHappychatAvailable: isHappychatAvailable( state ),
} );

const mapDispatchToProps = () => ( {
happychatEvent: () => recordTracksEvent( 'rewind_credentials_get_help' ),
} );

export default connect( mapStateToProps, mapDispatchToProps )( localize( SetupFooter ) );
export default connect(
state => ( {
happychatIsAvailable: isHappychatAvailable( state ),
} ),
{
happychatEvent: () => recordTracksEvent( 'rewind_credentials_get_help' ),
}
)( localize( SetupFooter ) );

0 comments on commit c5a04fe

Please sign in to comment.