Wired choose plan back button on newsletter page

This commit is contained in:
Rishabh 2022-05-12 23:29:09 +05:30
parent 2e1567ac67
commit b3d2dbc9e9
2 changed files with 2 additions and 9 deletions

View File

@ -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>

View File

@ -476,9 +476,6 @@ class SignupPage extends React.Component {
return (
<NewsletterSelectionPage
pageData={this.state.pageData}
onSubmit={() => {
// Handle submit
}}
onBack={() => {
this.setState({
showNewsletterSelection: false