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 || '';
return (
<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>
);
} else if (type === 'signin' && status === 'error') {