mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-04 17:04:59 +03:00
Updated default page to always open from trigger button
refs https://github.com/TryGhost/members.js/issues/77 - Portal button should always show the Subscribe/Account Home screen based on logged-in status - Resets state to expected page on every open toggle
This commit is contained in:
parent
bb7dba6fea
commit
7de783a252
@ -168,7 +168,13 @@ class TriggerButtonContent extends React.Component {
|
||||
}
|
||||
|
||||
onToggle() {
|
||||
this.context.onAction('togglePopup');
|
||||
const {showPopup, member} = this.context;
|
||||
if (showPopup) {
|
||||
this.context.onAction('closePopup');
|
||||
} else {
|
||||
const page = member ? 'accountHome' : 'signup';
|
||||
this.context.onAction('openPopup', {page});
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
|
Loading…
Reference in New Issue
Block a user