Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard: Remove user connection nudge from stats at a glance #39496

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ import { createInterpolateElement } from '@wordpress/element';
import { __, _x, _n, sprintf } from '@wordpress/i18n';
import clsx from 'clsx';
import Button from 'components/button';
import ConnectButton from 'components/connect-button';
import analytics from 'lib/analytics';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Component } from 'react';
import { connect } from 'react-redux';
import { isOdysseyStatsEnabled, isWoASite, userCanConnectAccount } from 'state/initial-state';
import { isOdysseyStatsEnabled } from 'state/initial-state';

class DashStatsBottom extends Component {
statsBottom() {
Expand Down Expand Up @@ -108,16 +107,6 @@ class DashStatsBottom extends Component {
),
} )
}
{ ! this.props.isLinked && this.props.userCanConnectAccount && (
<ConnectButton
connectUser={ true }
from="unlinked-user-connect"
connectLegend={ __(
'Connect your WordPress.com account for more metrics',
'jetpack'
) }
/>
) }
{ this.props.isLinked &&
! this.props.isOdysseyStatsEnabled && // Only show if Odyssey Stats is disabled
createInterpolateElement(
Expand Down Expand Up @@ -165,7 +154,5 @@ DashStatsBottom.defaultProps = {
export default connect( state => {
return {
isOdysseyStatsEnabled: isOdysseyStatsEnabled( state ),
isWoASite: isWoASite( state ),
userCanConnectAccount: userCanConnectAccount( state ),
};
} )( DashStatsBottom );
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

Remove user connection nudge from Stats module on the dashboard
Loading