Fixed showing name in Portal notification

fixes https://github.com/TryGhost/Ghost/issues/17242

- we weren't passing the correct parameter to the translation function,
  so the name placeholder wasn't being replaced
This commit is contained in:
Daniel Lockyer 2023-07-07 16:03:40 +02:00 committed by Daniel Lockyer
parent b6131f0631
commit c5aea0caee

View File

@ -34,7 +34,7 @@ const NotificationText = ({type, status, context}) => {
const firstname = context.member.firstname || ''; const firstname = context.member.firstname || '';
return ( return (
<p> <p>
{firstname ? t('Welcome back, {{name}}!', firstname) : t('Welcome back!')}<br />{t('You\'ve successfully signed in.')} {firstname ? t('Welcome back, {{name}}!', {name: firstname}) : t('Welcome back!')}<br />{t('You\'ve successfully signed in.')}
</p> </p>
); );
} else if (type === 'signin' && status === 'error') { } else if (type === 'signin' && status === 'error') {