Added no-op subscribe button handling

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

- adds no-op method to handle subscribe option in account page
- fixes lint
This commit is contained in:
Rish 2020-05-01 12:46:20 +05:30
parent 67a07893b0
commit c67ec1f730

View File

@ -64,6 +64,10 @@ export default class AccountHomePage extends React.Component {
// no-op // no-op
} }
openSubscribe(e) {
//no-op
}
renderAccountFooter() { renderAccountFooter() {
return ( return (
<div style={{display: 'flex', padding: '0 24px', marginTop: '6px', color: this.context.brandColor, fontWeight: 'bold', fontSize: '13px'}}> <div style={{display: 'flex', padding: '0 24px', marginTop: '6px', color: this.context.brandColor, fontWeight: 'bold', fontSize: '13px'}}>
@ -86,7 +90,7 @@ export default class AccountHomePage extends React.Component {
<span style={{fontWeight: 'bold'}}>Hey {firstname || name || email}! </span> <span style={{fontWeight: 'bold'}}>Hey {firstname || name || email}! </span>
You are subscribed to free updates from <span style={{fontWeight: 'bold'}}>{siteTitle}</span>, but you don't have a paid subscription to unlock full access You are subscribed to free updates from <span style={{fontWeight: 'bold'}}>{siteTitle}</span>, but you don't have a paid subscription to unlock full access
</div> </div>
<ActionButton label="Subscribe now" onClick={e => {}} brandColor={this.context.brandColor} /> <ActionButton label="Subscribe now" onClick={e => this.openSubscribe(e)} brandColor={this.context.brandColor} />
</div> </div>
); );
} }