mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-08 02:52:39 -05:00
Updated newsletter updated messaging
refs https://github.com/TryGhost/members.js/issues/95 - Updates the newsletter status update as part of existing label
This commit is contained in:
parent
baf15f577c
commit
21a7d61c85
2 changed files with 5 additions and 14 deletions
|
@ -248,7 +248,7 @@ export default class App extends React.Component {
|
|||
this.setState({
|
||||
action: ''
|
||||
});
|
||||
}, 5000);
|
||||
}, 2000);
|
||||
} catch (e) {
|
||||
this.setState({
|
||||
action: `${action}:failed`
|
||||
|
|
|
@ -196,21 +196,13 @@ const PaidAccountActions = ({member, openUpdatePlan, onEditBilling}) => {
|
|||
return null;
|
||||
};
|
||||
|
||||
const NotifyNewsletterUpdated = ({action}) => {
|
||||
if (action === 'updateNewsletter:success') {
|
||||
return (
|
||||
<p>
|
||||
✓ Newsletter updated
|
||||
</p>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const AccountActions = ({member, action, openEditProfile, openUpdatePlan, onEditBilling, onToggleSubscription}) => {
|
||||
const {name, email, subscribed} = member;
|
||||
|
||||
const label = subscribed ? 'Subscribed to email newsletters' : 'Not subscribed to email newsletters';
|
||||
let label = subscribed ? 'Subscribed to email newsletters' : 'Not subscribed to email newsletters';
|
||||
if (action === 'updateNewsletter:success') {
|
||||
label = '✓ Newsletter updated';
|
||||
}
|
||||
return (
|
||||
<div className='gh-portal-list'>
|
||||
<section>
|
||||
|
@ -227,7 +219,6 @@ const AccountActions = ({member, action, openEditProfile, openUpdatePlan, onEdit
|
|||
<div className='gh-portal-list-detail'>
|
||||
<h3>Newsletter</h3>
|
||||
<p>{label}</p>
|
||||
<NotifyNewsletterUpdated action={action} />
|
||||
</div>
|
||||
<div>
|
||||
<Switch onToggle={(e) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue