Added edit profile page UI for paid member

refs https://github.com/TryGhost/members.js/issues/20

- Connects account profile page to edit button for paid member's account home area
This commit is contained in:
Rish 2020-05-07 21:11:17 +05:30
parent 694ec683fe
commit 5a1fa6fdf4

View File

@ -110,10 +110,17 @@ export default class PaidAccountHomePage extends React.Component {
return `**** **** **** ${defaultCardLast4}`;
}
onEditProfile() {
this.context.onAction('switchPage', {
page: 'accountProfile',
lastPage: 'paidAccountHome'
});
}
renderAccountDetails() {
const buttonStyle = {
padding: '6px 9px', border: '1px solid black', width: '60px', display: 'flex', justifyContent: 'center',
borderRadius: '5px'
borderRadius: '5px', cursor: 'pointer'
};
const {name, email, subscriptions} = this.context.member;
@ -132,7 +139,7 @@ export default class PaidAccountHomePage extends React.Component {
<div style={{color: '#666666', fontSize: '11px'}}> {email} </div>
</div>
</div>
<div style={buttonStyle}>
<div style={buttonStyle} onClick={e => this.onEditProfile(e)}>
Edit
</div>
</div>