mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 20:03:12 +03:00
Wired choose plan back button on newsletter page
This commit is contained in:
parent
2e1567ac67
commit
b3d2dbc9e9
@ -64,7 +64,7 @@ function NewsletterPrefs({subscribedNewsletters, setSubscribedNewsletters}) {
|
||||
});
|
||||
}
|
||||
|
||||
export default function NewsletterSelectionPage({pageData}) {
|
||||
export default function NewsletterSelectionPage({pageData, onBack}) {
|
||||
const {brandColor, site, onAction, action} = useContext(AppContext);
|
||||
const siteNewsletters = getSiteNewsletters({site});
|
||||
const defaultNewsletters = siteNewsletters.filter((d) => {
|
||||
@ -122,11 +122,7 @@ export default function NewsletterSelectionPage({pageData}) {
|
||||
<button
|
||||
className='gh-portal-btn gh-portal-btn-link gh-portal-btn-different-plan'
|
||||
onClick = {() => {
|
||||
if (this.props.onBack) {
|
||||
this.props.onBack();
|
||||
} else {
|
||||
this.context.onAction('closePopup');
|
||||
}
|
||||
onBack();
|
||||
}}>
|
||||
<span>Choose a different plan</span>
|
||||
</button>
|
||||
|
@ -476,9 +476,6 @@ class SignupPage extends React.Component {
|
||||
return (
|
||||
<NewsletterSelectionPage
|
||||
pageData={this.state.pageData}
|
||||
onSubmit={() => {
|
||||
// Handle submit
|
||||
}}
|
||||
onBack={() => {
|
||||
this.setState({
|
||||
showNewsletterSelection: false
|
||||
|
Loading…
Reference in New Issue
Block a user