Skip to content

Commit

Permalink
My Jetpack: replace Creator card with Newsletter
Browse files Browse the repository at this point in the history
  • Loading branch information
IanRamosC committed Jul 19, 2024
1 parent c5e75cf commit 0896c03
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import AiCard from './ai-card';
import AntiSpamCard from './anti-spam-card';
import BackupCard from './backup-card';
import BoostCard from './boost-card';
import CreatorCard from './creator-card';
import CrmCard from './crm-card';
import NewsletterCard from './newsletter-card';
import ProtectCard from './protect-card';
import SearchCard from './search-card';
import SocialCard from './social-card';
Expand All @@ -29,7 +29,7 @@ type DisplayItemType = Record<

const DisplayItems: FC< DisplayItemsProps > = ( { slugs } ) => {
const { showFullJetpackStatsCard = false } = getMyJetpackWindowInitialState( 'myJetpackFlags' );
const { isAtomic = false, userIsAdmin = false } = getMyJetpackWindowInitialState();
const { userIsAdmin = false } = getMyJetpackWindowInitialState();

const items: DisplayItemType = {
backup: BackupCard,
Expand All @@ -40,7 +40,7 @@ const DisplayItems: FC< DisplayItemsProps > = ( { slugs } ) => {
videopress: VideopressCard,
stats: StatsCard,
crm: CrmCard,
creator: ! isAtomic ? CreatorCard : null,
newsletter: NewsletterCard,
social: SocialCard,
'jetpack-ai': AiCard,
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import PropTypes from 'prop-types';
import React from 'react';
import ProductCard from '../connected-product-card';

const NewsletterCard = ( { admin } ) => {
return <ProductCard admin={ admin } slug="newsletter" upgradeInInterstitial={ true } />;
};

NewsletterCard.propTypes = {
admin: PropTypes.bool.isRequired,
};

export default NewsletterCard;

0 comments on commit 0896c03

Please sign in to comment.