Skip to content

Commit

Permalink
React Dashboard: remove link to "My Jetpack" (#33811)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeherve authored Oct 26, 2023
1 parent 23d6ab5 commit 1755031
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import { hasConnectedOwner, isCurrentUserLinked, isOfflineMode } from 'state/connection';
import {
getSiteAdminUrl,
getSiteRawUrl,
showRecommendations,
showMyJetpack,
userCanManageModules as _userCanManageModules,
userCanViewStats as _userCanViewStats,
getPurchaseToken,
Expand Down Expand Up @@ -66,10 +64,6 @@ export class Navigation extends React.Component {
} );
};

trackMyJetpackClick = () => {
this.trackNavClick( 'my-jetpack' );
};

componentDidMount() {
this.trackNewRecommendations();
}
Expand Down Expand Up @@ -144,14 +138,6 @@ export class Navigation extends React.Component {
) }
</NavItem>
) }
{ this.props.showMyJetpack && (
<NavItem
path={ this.props.adminUrl + 'admin.php?page=my-jetpack' }
onClick={ this.trackMyJetpackClick }
>
{ _x( 'My Jetpack', 'Navigation item.', 'jetpack' ) }
</NavItem>
) }
</NavTabs>
);
} else {
Expand Down Expand Up @@ -192,8 +178,6 @@ export default connect( state => {
showRecommendations: showRecommendations( state ),
newRecommendationsCount: getNonViewedRecommendationsCount( state ),
siteUrl: getSiteRawUrl( state ),
adminUrl: getSiteAdminUrl( state ),
purchaseToken: getPurchaseToken( state ),
showMyJetpack: showMyJetpack( state ),
};
} )( withRouter( Navigation ) );
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,5 @@ describe( 'Navigation', () => {
expect( screen.getByRole( 'menuitem', { name: 'Recommendations 1' } ) ).toBeInTheDocument();
expect( screen.getByRole( 'option', { name: 'Recommendations 1' } ) ).toBeInTheDocument();
} );

it( 'renders My Jetpack tab', () => {
render( <Navigation { ...currentTestProps } showMyJetpack={ true } /> );
expect( screen.getByRole( 'menuitem', { name: 'My Jetpack' } ) ).toBeInTheDocument();
expect( screen.getByRole( 'option', { name: 'My Jetpack' } ) ).toBeInTheDocument();
} );
} );
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

Dashboard: remove link to "My Jetpack"

0 comments on commit 1755031

Please sign in to comment.