Skip to content

Commit

Permalink
Remove/user connection nudge from stats at a glance (#39496)
Browse files Browse the repository at this point in the history
* Remove user connection nudge from Stats module on At A Glance

* changelog

* Remove unused variable
  • Loading branch information
CodeyGuyDylan authored Sep 25, 2024
1 parent 24057f3 commit 110a12e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
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

0 comments on commit 110a12e

Please sign in to comment.