diff --git a/apps/comments-ui/src/components/CTABox.js b/apps/comments-ui/src/components/CTABox.js index bc61b1cda9..b21da0a1a3 100644 --- a/apps/comments-ui/src/components/CTABox.js +++ b/apps/comments-ui/src/components/CTABox.js @@ -2,7 +2,7 @@ import {useContext} from 'react'; import AppContext from '../AppContext'; const CTABox = (props) => { - const {accentColor, publication} = useContext(AppContext); + const {accentColor, publication, member} = useContext(AppContext); const buttonStyle = { backgroundColor: accentColor @@ -14,8 +14,8 @@ const CTABox = (props) => { const titleText = (props.isFirst ? 'Start the conversation' : 'Join the discussion'); - const handleSubscribeClick = (event) => { - window.location.href = props.isPaid ? '#/portal/account/plans' : '#/portal/signup'; + const handleSignUpClick = (event) => { + window.location.href = (props.isPaid && member) ? '#/portal/account/plans' : '#/portal/signup'; }; const handleSignInClick = (event) => { @@ -23,20 +23,20 @@ const CTABox = (props) => { }; return ( -
+

{titleText}

Become a {props.isPaid && 'paid'} member of {publication} to start commenting.

- -

+ {!member && (

Already a member? -

+

)}
); };