Skip to content

Commit e687f62

Browse files
committed
Remove unnecessary downgraded Atomic workaround from the My Themes screen
1 parent 108187d commit e687f62

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

client/my-sites/themes/themes-selection.jsx

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import {
2-
FEATURE_INSTALL_THEMES,
3-
WPCOM_FEATURES_PREMIUM_THEMES_UNLIMITED,
4-
} from '@automattic/calypso-products';
1+
import { FEATURE_INSTALL_THEMES } from '@automattic/calypso-products';
52
import pageRouter from '@automattic/calypso-router';
63
import { compact } from 'lodash';
74
import PropTypes from 'prop-types';
@@ -13,7 +10,6 @@ import ThemesList from 'calypso/components/themes-list';
1310
import { getThemeShowcaseEventRecorder } from 'calypso/my-sites/themes/events/theme-showcase-tracks';
1411
import { recordGoogleEvent, recordTracksEvent } from 'calypso/state/analytics/actions';
1512
import { isUserLoggedIn } from 'calypso/state/current-user/selectors';
16-
import isSiteAutomatedTransfer from 'calypso/state/selectors/is-site-automated-transfer';
1713
import siteHasFeature from 'calypso/state/selectors/site-has-feature';
1814
import { getSiteSlug } from 'calypso/state/sites/selectors';
1915
import { setThemePreviewOptions } from 'calypso/state/themes/actions';
@@ -325,14 +321,8 @@ export const ConnectedThemesSelection = connect(
325321
state,
326322
{ filter, page, search, tier, vertical, siteId, source, forceWpOrgSearch, tabFilter }
327323
) => {
328-
const isAtomic = isSiteAutomatedTransfer( state, siteId );
329324
const premiumThemesEnabled = arePremiumThemesEnabled( state, siteId );
330325
const hiddenFilters = getThemeHiddenFilters( state, siteId, tabFilter );
331-
const hasUnlimitedPremiumThemes = siteHasFeature(
332-
state,
333-
siteId,
334-
WPCOM_FEATURES_PREMIUM_THEMES_UNLIMITED
335-
);
336326
const canInstallThemes = siteHasFeature( state, siteId, FEATURE_INSTALL_THEMES );
337327

338328
let sourceSiteId;
@@ -342,10 +332,6 @@ export const ConnectedThemesSelection = connect(
342332
sourceSiteId = siteId ? siteId : 'wpcom';
343333
}
344334

345-
if ( isAtomic && ! hasUnlimitedPremiumThemes ) {
346-
sourceSiteId = 'wpcom';
347-
}
348-
349335
// number calculation is just a hack for Jetpack sites. Jetpack themes endpoint does not paginate the
350336
// results and sends all of the themes at once. QueryManager is not expecting such behaviour
351337
// and we ended up loosing all of the themes above number 20. Real solution will be pagination on

0 commit comments

Comments
 (0)