0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

Added in the suppression check to stop link from showing on Portal home

refs https://github.com/TryGhost/Team/issues/2348
This commit is contained in:
James Morris 2022-12-01 18:59:25 +00:00
parent 50383316c0
commit 2405b59f55

View file

@ -1,6 +1,6 @@
import AppContext from 'AppContext';
import Switch from 'components/common/Switch';
import {getSiteNewsletters} from 'utils/helpers';
import {getSiteNewsletters, hasMemberGotEmailSuppression} from 'utils/helpers';
import {useContext} from 'react';
function EmailNewsletterAction() {
@ -20,7 +20,7 @@ function EmailNewsletterAction() {
<section>
<div className='gh-portal-list-detail'>
<h3>Email newsletter</h3>
<p>{label} {subscribed && <button
<p>{label} {hasMemberGotEmailSuppression({member}) && subscribed && <button
className='gh-portal-btn-text gh-email-faq-page-button'
onClick={() => onAction('switchPage', {page: 'emailReceivingFAQ', lastPage: 'accountHome'})}
>