mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-27 04:43: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 {brandColor, site, onAction, action} = useContext(AppContext);
|
||||||
const siteNewsletters = getSiteNewsletters({site});
|
const siteNewsletters = getSiteNewsletters({site});
|
||||||
const defaultNewsletters = siteNewsletters.filter((d) => {
|
const defaultNewsletters = siteNewsletters.filter((d) => {
|
||||||
@ -122,11 +122,7 @@ export default function NewsletterSelectionPage({pageData}) {
|
|||||||
<button
|
<button
|
||||||
className='gh-portal-btn gh-portal-btn-link gh-portal-btn-different-plan'
|
className='gh-portal-btn gh-portal-btn-link gh-portal-btn-different-plan'
|
||||||
onClick = {() => {
|
onClick = {() => {
|
||||||
if (this.props.onBack) {
|
onBack();
|
||||||
this.props.onBack();
|
|
||||||
} else {
|
|
||||||
this.context.onAction('closePopup');
|
|
||||||
}
|
|
||||||
}}>
|
}}>
|
||||||
<span>Choose a different plan</span>
|
<span>Choose a different plan</span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -476,9 +476,6 @@ class SignupPage extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<NewsletterSelectionPage
|
<NewsletterSelectionPage
|
||||||
pageData={this.state.pageData}
|
pageData={this.state.pageData}
|
||||||
onSubmit={() => {
|
|
||||||
// Handle submit
|
|
||||||
}}
|
|
||||||
onBack={() => {
|
onBack={() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showNewsletterSelection: false
|
showNewsletterSelection: false
|
||||||
|
Loading…
Reference in New Issue
Block a user