Skip to content

Commit

Permalink
Newsletters: Hide subscribe modal link on atomic (Automattic#81045)
Browse files Browse the repository at this point in the history
  • Loading branch information
edanzer authored Aug 24, 2023
1 parent 9532532 commit 5667110
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useSelector } from 'react-redux';
import FormSettingExplanation from 'calypso/components/forms/form-setting-explanation';
import { useActiveThemeQuery } from 'calypso/data/themes/use-active-theme-query';
import getSiteEditorUrl from 'calypso/state/selectors/get-site-editor-url';
import isSiteAutomatedTransfer from 'calypso/state/selectors/is-site-automated-transfer';
import { getSelectedSiteId } from 'calypso/state/ui/selectors';
export const SUBSCRIBE_MODAL_OPTION = 'sm_enabled';

Expand All @@ -31,6 +32,7 @@ export const SubscribeModalSetting = ( {
}: SubscribeModalSettingProps ) => {
const translate = useTranslate();
const siteId = useSelector( getSelectedSiteId ) as number;
const isAtomicSite = useSelector( ( state ) => isSiteAutomatedTransfer( state, siteId ) );

// Construct a link to edit the modal
const { data: activeThemeData } = useActiveThemeQuery( siteId, true );
Expand Down Expand Up @@ -65,7 +67,7 @@ export const SubscribeModalSetting = ( {
: translate(
'Grow your subscriber list by enabling a popup modal with a subscribe form. This will show as readers scroll.'
) }
{ isModalEditTranslated && subscribeModalEditorUrl && (
{ isModalEditTranslated && subscribeModalEditorUrl && ! isAtomicSite && (
<>
{ ' ' }
<ExternalLink href={ subscribeModalEditorUrl }>
Expand Down

0 comments on commit 5667110

Please sign in to comment.