mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Used comment count to determine which text to show in the CTA box (#21512)
REF PLG-251 - This change uses commentCount instead of isFirst to ensure that the CTA box text is correct regardless of layout.
This commit is contained in:
parent
0316c3f16e
commit
599a526dd7
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@ type Props = {
|
|||
isPaid: boolean
|
||||
};
|
||||
const CTABox: React.FC<Props> = ({isFirst, isPaid}) => {
|
||||
const {accentColor, publication, member, t} = useAppContext();
|
||||
const {accentColor, publication, member, t, commentCount} = useAppContext();
|
||||
|
||||
const buttonStyle = {
|
||||
backgroundColor: accentColor
|
||||
|
@ -16,7 +16,7 @@ const CTABox: React.FC<Props> = ({isFirst, isPaid}) => {
|
|||
color: accentColor
|
||||
};
|
||||
|
||||
const titleText = (isFirst ? t('Start the conversation') : t('Join the discussion'));
|
||||
const titleText = (commentCount === 0 ? t('Start the conversation') : t('Join the discussion'));
|
||||
|
||||
const handleSignUpClick = () => {
|
||||
window.location.href = (isPaid && member) ? '#/portal/account/plans' : '#/portal/signup';
|
||||
|
|
Loading…
Reference in a new issue